Disable auto reconnect

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
galit
Posts: 19
Joined: Mon 12 Feb 2007 11:07

Disable auto reconnect

Post by galit » 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?

AndreyZ

Post by AndreyZ » Wed 07 Dec 2011 11:42

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.

galit
Posts: 19
Joined: Mon 12 Feb 2007 11:07

Post by galit » Wed 07 Dec 2011 14:48

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.

AndreyZ

Post by AndreyZ » Wed 07 Dec 2011 15:58

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.

galit
Posts: 19
Joined: Mon 12 Feb 2007 11:07

Post by galit » Sun 29 Jan 2012 08:58

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

AndreyZ

Post by AndreyZ » Mon 30 Jan 2012 09:11

We will include this functionality to the next dbExpress driver for SQL Server version.

Post Reply