Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO connections

Status
Not open for further replies.

sifitz

Programmer
Feb 27, 2002
47
GB
I have some code calling queries on a SQL Server 7 database using ADO via ODBC. I have explicitly declared only one connection at the start of the code. After that I can use multiple recordsets using the same connection but sometimes it creates new connections that I haven't declared. (I have seen the connections in the Win2000 Permance Manager and in the SQL Server logs).

I need to keep the number of connections to the minimum (ideally just the one).

It seems that a connection is established when a new recordset has been created with the 'Dim' keyword and occurs when the ActiveConnection is set (set to the only connection in the application). However, the problem does seem to be intermittent.

Is there a clear reason why this is happening?

Thanks,

Si Fitz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top