Recordset and connections

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

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

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

LVL 1
jcsfreiAsked:
Who is Participating?

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

x
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.
0

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.
0
MuffyBunnyCommented:
From a database standpoint, multiple people accessing your site will show multiple concurrent processes on your database.
0
jcsfreiAuthor Commented:
tks
0
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.