Page 1 of 1

Disable auto reconnect

Posted: Wed 07 Dec 2011 08:34
by galit
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?

Posted: Wed 07 Dec 2011 11:42
by AndreyZ
Hello,

We changed this behaviour several years ago. We did it because we had had many requests from our users about it. Since that time we haven't had requests about changing such behaviour. Please describe in details why you need this old behaviour.

Posted: Wed 07 Dec 2011 14:48
by galit
Thanks for the fast reply,

We need this option to control user login from multiple processes,

We use the 'KILL SPID#' to disconnect users

As I have explained it worked great with the older drivers.
when we upgraded to newer drivers it stopped working.

We need an option to make connection stay disconnect if an error occurs.
Trying to use the OnDisconnect event didn't work as it only fires the event when the connection is being closed by the 'Close()' method and not when an exception was raised.

Posted: Wed 07 Dec 2011 15:58
by AndreyZ
We will add an option to control this behaviour in the future, but we cannot provide any timeframe because we have tasks of higher priority.

Posted: Sun 29 Jan 2012 08:58
by galit
Hello again,

This matter has become urgent to us and we need to know when are you going to implement this functionality.

We must have an option to terminate user connections.

Thanks in advance

Posted: Mon 30 Jan 2012 09:11
by AndreyZ
We will include this functionality to the next dbExpress driver for SQL Server version.