Recordset and connections

In a simple ASP script, where you open one connection, then open two recordsets in a row

cnn.ConnectionString = "xxx"
cnn.CursorLocation = 3
Set RS1 = cnn.Execute("select a from b")
Set RS2 = cnn.Execute("select c from d")
..... do some stuff with the results

After doing that, before closing RS1 or RS2, the active connection of each recordset is the same cnn first opened? Or ADO will automatically open a second connection, identical to cnn, for RS2?

I am seeing multple connections on my database and I suspect that it is happening. If you have many active recordsets, and they are all open, do I have many database connections ou just one? Disconnected recordset would help reduce open connections on the database?

Thanks in advance, Joao

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
for old version of ADO, before ADO.NET, you can open just 1 connection and can let many recordsets connect to it.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Carl TawnSystems and Integration DeveloperCommented:
In that snippet you are using a single connection and issuing two separate commands, both of which use the same connection.
From a database standpoint, multiple people accessing your site will show multiple concurrent processes on your database.
jcsfreiAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.