Disable auto reconnect
Posted: Wed 07 Dec 2011 08:34
Hello,
We have an application that should not be allowed to reconnect to the DB in some cases. This worked fine in dbExpress 3 drivers but doesn't in the 4.x drivers.
This is the scenario:
1. Create application that opens connection to the db with the dbexpsda.dll
2. Execute a select query from inside the application
3. From outside source (like MS Query analyzer) kill the connection with the 'KILL ###' command
4. Execute 'select' query from the application will give error - this is good but in the 4.x drivers will auto reconnect after this error and in 3.x will not reconnect
5. Execute another 'Select' query - in 4.x will work and in 3.x will give another error.
we want to mimic the 3.x behavior that doesn't reconnect,
what can be done?
We have an application that should not be allowed to reconnect to the DB in some cases. This worked fine in dbExpress 3 drivers but doesn't in the 4.x drivers.
This is the scenario:
1. Create application that opens connection to the db with the dbexpsda.dll
2. Execute a select query from inside the application
3. From outside source (like MS Query analyzer) kill the connection with the 'KILL ###' command
4. Execute 'select' query from the application will give error - this is good but in the 4.x drivers will auto reconnect after this error and in 3.x will not reconnect
5. Execute another 'Select' query - in 4.x will work and in 3.x will give another error.
we want to mimic the 3.x behavior that doesn't reconnect,
what can be done?