Re: Best way to use a sigle TADOconnection with several threads
- From: danny heijl <danny_dot_heijl_at_cevi_dot_be>
- Date: Thu, 24 May 2007 10:33:19 +0200
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
---
.
- Follow-Ups:
- Re: Best way to use a sigle TADOconnection with several threads
- From: Del Murray
- Re: Best way to use a sigle TADOconnection with several threads
- References:
- Prev by Date: Re: Best way to use a sigle TADOconnection with several threads
- Next by Date: wrong interpretation ADO or Jet 4.0
- Previous by thread: Re: Best way to use a sigle TADOconnection with several threads
- Next by thread: Re: Best way to use a sigle TADOconnection with several threads
- Index(es):
Relevant Pages
|