View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
tod tod is offline
external usenet poster
 
Posts: 114
Default One instance of ADO.Connection for all procs

I have several procedures that use ADO to connect to a
database and retrieve Recordsets. In each of these
procedures I open a Connection, use some SQL to get the
Recordset, then close the Connection.

Since all of the procedures are using the same Connection
to the same database, it seems I should be able to open
the Connection once, have all my procedures use that
Connection, then close and destroy the object when I'm
done.

My initial idea as to have a class module that I use to
create that instance. But.... that's where I reach the
cul de sac on my knowledge of this topic.

Any help?
tod