1,105,169 Community Members

understanding ado connection string

Member Avatar
Newbie Poster
5 posts since Jun 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]

I am working with sql server using ADO provider.
My code uses recordsets and commands to run quries and I fail to understand a basic issue - connections.

In my code, they set a connection string (which is being built in the code, not taken from other ADO element) to the property "connectionString" and call the Open (for recordSet) or Execute (for command) and it seems to work.
My question is who manages the connection? who opens it and closes it?
Does setting connection string to the ADO recordSet / command automatically open a connection? and does calling the Close method automatically close it? Does the SQL server manage it behind the scenes?

Member Avatar
Ancient Dragon
Achieved Level 70
27,583 posts since Aug 2005
Reputation Points: 5,232 [?]
Q&As Helped to Solve: 3,031 [?]
Skill Endorsements: 115 [?]
Team Colleague

The concept is very similar to fstream's open() and close() methods, except ADO uses COM or sockets as underlying file/data transfer.

This article has been dead for over three months: Start a new discussion instead
Start New Discussion
View similar articles that have also been tagged: