Quit (WEB)

Was running a web app and it crashed. Looking I found out MySql server had stop so the app could not connect to the database.

Debugging the app and found that in the connect routine that if it failed to quit. Code follows:

If mDB.Connect Then mIsConnected = True app.AppendToDBErrorLog("Database open. ") Else mIsConnected = False app.DoErrMsg ("Error connecting to MySQL: " + EndOfLine + CurrentMethodName+"(E01)") Session.Quit ( ) End If
At first had “Session.Quit” as “Quit”

Quit does nothing, just continues; the Close Event does not run. What am I doing wrong.

Where is this code?

It’s method: DBOpen, in Session.

Okay, and what version of the ide are you using?

2014 r2.1

Regardless, Session.Quit or Quit, when called from within a Session call the exact same code. This just tells the framework that the Session is ready to be closed, but if you have any references to the session or any of the properties of the session in use elsewhere in your app, the session will never close.

For instance, is mdb referenced elsewhere and not released?

So any properties of the Session need to nil’ed out?

All or just one I put stuff in?

Thanks Greg
I’ve taken care of it. I move the code to the Session.Open event; before doing any addition stuff.

The problem with the code is NOT the real problem. The real problem was not testing for that error event. I just fail to think of it.

Thanks again.