Salut,
am I the only who have problems with FINALLY in Error-Case with CATCH.
If open DB (mysql), in case of an wrong password
FINALLY is executed before CATCH.
In that SUB
PUBLIC SUB btnOK_Click()
DIM sDB AS String
IF cboHost.text = "" THEN
cboHost.text = "localhost" ' is default
ENDIF
TRY crmConn.Close
ME.enabled = FALSE
WITH crmConn
.Type = "mysql"
.Host = cboHost.Text
.Login = txtUser.Text
.Password = txtPW.Text
.Open
sDB = GetDataBase(Main.MyConfig["CRMDatabase", "CRM2"])
IF sDB <> "" THEN
Main.MyConfig["CRMDatabase"] = sDB
ME.Close()
ENDIF
END WITH
FINALLY
txtPW.Text = ""
'gb2 ME.enabled = TRUE
CATCH
Message.Error(Replace(Error.Text, ".", "." & gb.NewLine))
END
gambas2.15.2
--
Amicalment
Charlie
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user