Do i have to close mySQLCommunityServer connections on App.Close?

Or will all connections be automatically closed while the App closes?

No one knows an answer, please? :slight_smile:

Maybe you can check this by looking at the open connections of the database while shutting down the app without closing the connection. Normally the database engine should check if a connection is alive and if not close it by itself otherwise there is a huge security risk. However there are settings in the db-engine to keep connections alive for a settable time, which should be as short as possible.

When the db object goes out of scope it will automatically close.

Thank you Andre and Bob.

I asked because i have open connections to 7 different mySQL and MSSQL Databases. And sometimes, closing the app takes a while.
In my Closing Timer, i had the following code multiple times to close each connection:

rs = OTRS_DB.SQLSelect("SELECT 1 FROM DUAL") If rs<>Nil Then OTRS_DB.Close