disconnected mode & threads

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

disconnected mode & threads

Post by Ludek » Thu 04 Jun 2009 15:00

can I use disconnected mode in other thread or not? i'm creating and using the db connection in the other thread, but i still get disconnected after each command sent...? in main thread it works fine...

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: disconnected mode & threads

Post by Dimon » Fri 05 Jun 2009 07:36

Yes, you can use disconnected mode in another thread.
Ludek wrote:i'm creating and using the db connection in the other thread, but i still get disconnected after each command sent...?
DisconnectedMode is used to open a connection only when it is needed for performing a server call and it is closed after performing the operation.

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Post by Ludek » Mon 08 Jun 2009 12:04

You write following in the help
If the connection was explicitly opened (the Connect method was called or the Connected property was explicitly set to True), it does not close until the Disonnect method is called or the Connected property is set to False explicitly.
this was not true in sdac 4.70.0.46 (it has been corrected in 4.70.0.47) and it is still not true in 4.70.0.47, if the connection component is created and used in non-main thread.

so something should be corrected - the help (you should mention there, it is not valid for other threads) or sdac.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 09 Jun 2009 08:56

Please try to compose a small sample to demonstrate the problem and send it to dmitryg*devart*com.

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Post by Ludek » Tue 09 Jun 2009 09:39

i'll send it ASAP (i have now detected one next disconnection problem, that i must analyze first, i'll send you example then for both cases)

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Post by Ludek » Tue 09 Jun 2009 11:14

sorry, it is no problem with threads, just with sql errors. the connection gets disconnected, when sql error occurs (raiserror + rollback in trigger, incorrect syntax, anything).

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Post by Ludek » Thu 11 Jun 2009 19:52

Are you able to reproduce it? Or should I send a sample?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 12 Jun 2009 06:43

Thank you for information. We have reproduced the problem. The investigation of the problem is in progress. As soon as we solve the problem we will let you know.

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Post by Ludek » Tue 23 Jun 2009 07:35

Still no news? :cry:

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 23 Jun 2009 09:35

We have fixed this problem. This fix will be included in the next SDAC build.

Post Reply