Hello there , i have a problem with following Code -
Var db As New MySQLCommunityServer
db.Host = “…my - server”
db.Port = 3306
db.DatabaseName = “my database”
db.UserName = “my db username”
db.Password = “my db passwort”
Try
db.Connect
Label1.Text=“Database connected”
Catch error As DatabaseException
// DB Connection error
MessageBox(error.Message)
End Try
Wen i start the Application all works fine… when i change the login information with wrong login credentials, i dont get an message-box with the error-message. The Application will just stop and mark the db.Connect Line…
What could be the Problem ? THX !
Var mIsConnected as Boolean
Try
mIsConnected = db.Connect
If mIsConnected Then
Label1.Text=“Database connected”
Else
Label1.Text=“Database is not connected”
End If
Catch error As DatabaseException
// DB Connection error
MessageBox(error.Message)
End Try
Use of the Ellipsis character instead of 3 dots ?
Remember: US build application (1) usually does not like non ASCII characters (rule of thumbs).
So try a different string using only ASCII characters (they have a value from 0 to 127, and you better skip those from 0 thru 31 - Control Characters - ).
@Thomas_Roemert Connect no longer returns a value; it throws an exception. That’s why the debugger is stopping on that line. He simply needs to click Continue to see the messagebox.