Hi @all!
I want to open a connection from a container control in a webapp to a mysql database.
Therefore ein initialized a property called db. In my method i use the following code.
'Dim db As New MySQLCommunityServer
db = New MySQLCommunityServer
db.Host = "myserver.de"
db.SSLMode = true
db.Port = 3306
db.DatabaseName = "mydatabase"
db.UserName = "myuser"
db.Password = "mypassword"
If db.Connect Then
' MsgBox "Bin verbunden"
else
MsgBox(db.ErrorMessage)
quit
end if
When i use my method and my property in a webpage everything works fine.
When i copy the method and the property to a container control and call the method in the shown event of the container control, the same code is not working.
Who has an idea to get it work? Are there any restrictions i have to know?
Check if the Event fires (eG. put some debug-print in it), there are some bugs, where events doesn’t fire if Container are stacked.
If it works, we need some error output…
In your example you should get the MSGBox with it.
Hi Jay.
Good question :o)
I can run the webapp for debugging. There is no exception or error message.
It seems, that the method was not called. I put an msgbox inside but nothing happens.
Calling the method in the open event of the containercontrol ==> not working, app starts but no functionality
Calling the method in the shown event of the containercontrol ==> not working, app starts but no functionality
3, Calling the method in shown event of my webpage “containercontrol1.openDB” ==> webapp starts, but quits immidiately with the standard message “The application has gone off-line. Please try again later.”