Re: Best way to use a sigle TADOconnection with several threads



Paul schreef:

What is the best approach ?

I think your current approach is the best one.

AFAIK you can not use an OLEDB connection outside of the thread in which it was created.

Any reason why you free/recreate the connections inside a thread?
I usually let a connection live until it gets lost for whatever reason.
Before each transaction I check the connection status using a "dummy" SQL statement (like "select current" OSTL to check the connection status with minimum overhead) and when the connection is no longer active I trie to reconnect (using the same AdoConnection instance).

Danny
---
.



Relevant Pages

  • ibrahim confines, then Eliza alright chops a marked protest till Wallys riot
    ... Hussein extends the reason in the light of hers and ... favourable shoulders. ... in connection with its neighbourhood. ... It might inflict widely, unless Hussein accompanys murderers ...
    (rec.games.roguelike.nethack)
  • Re: Was there ever a Japanese Defector?
    ... but I see no reason to think that somebody is to be absolutely ... connection with our second generation". ... It is an indication that some Japanese wanted to not report ... This is also the single intercept you have provided. ...
    (soc.history.war.world-war-ii)
  • Re: Probes on Port 135 and 445 continue
    ... A slow connection is a very good reason. ... checked by a senior Bank IT manager against ... I see no reason to have most ports below about 1030 open - that might ...
    (comp.security.misc)
  • Re: Probes on Port 135 and 445 continue
    ... A slow connection is a very good reason. ... checked by a senior Bank IT manager against ... I see no reason to have most ports below about 1030 open - that might ...
    (comp.security.unix)
  • Re: CEASE AND DESIST
    ... which must be where you made this odd connection. ... happy to know that Daniel Guetzkow is apparently still alive, ... reason to be involved with you other than to constantly remind you I'm ... *legitimate* lawsuit doesn't materialize, she's screwed herself, ...
    (misc.health.alternative)