UniDAC MS SQL Server disconnection

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Yuriy_
Posts: 4
Joined: Tue 27 Aug 2013 09:40

UniDAC MS SQL Server disconnection

Post by Yuriy_ » Wed 28 Aug 2013 08:07

Hello.

Recently I started to use UniDAC components in Delphi 2010 IDE to develop database applications for video surveillance systems. I wrote a small multithreaded application for connection to database and reading data. Each thread has it's own UniConnection to connect to database and UniQuery to retrieve data. I noticed, that if I establish a connection to Microsoft SQL Server (or to MS SQL Server Express) and while connection not established I cant disconnect it and free TUniConnection and thread.

How can I correctly disconnect and free a UniConnection "instantly" and my connection thread while connection to Microsoft SQL Server is in process?

Decreasing a connection timeout doesnt help.

Thanks.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: UniDAC MS SQL Server disconnection

Post by AlexP » Wed 28 Aug 2013 09:27

Hello,

You cannot call the Disconnect method while executing the Connect method.
Connection break on timeout is implemented at the level of the MS SQL client, and if you encounter difficulties with this functionality, you should contact the developers.

Yuriy_
Posts: 4
Joined: Tue 27 Aug 2013 09:40

Re: UniDAC MS SQL Server disconnection

Post by Yuriy_ » Wed 28 Aug 2013 09:39

Is there any other Delphi 2010 components that can disconnect from SQL Server while connection in process?

I tried the same thing using UniDAC and connection to MySQL and that works correctly.

Yuriy_
Posts: 4
Joined: Tue 27 Aug 2013 09:40

Re: UniDAC MS SQL Server disconnection

Post by Yuriy_ » Wed 28 Aug 2013 09:42

If I set timeout, for example, to 5 connection does not stops in 5 seconds when server is SQL Server.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: UniDAC MS SQL Server disconnection

Post by AlexP » Thu 29 Aug 2013 11:44

Hello,

We work with MS SQL Server via the client libraries, therefore we cannot affect the connection process. And we work with MySQL directly - not using client libraries - therefore, in this case, we define the behaviour by ourselves and can affect the process of connection to a DB

Post Reply