View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default How to determine if a connection is active



check the .State property
of the adodb.Connection object

anyway..
you should not needlessly leave the connection open.
close it when done. reopen when need.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


wrote :

I am writing an addin that manages an ODBC/OLEDB connection to a
database. I manage to make the connection without trouble. However,
I would like to be able to determine if the connection is still
active; for instance, the database might drop the connection if a
certain amount of time has passed without activity. How can I
determine if a connection is active?

Many thanks,

Phil