jcsfrei
asked on
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
From a database standpoint, multiple people accessing your site will show multiple concurrent processes on your database.
ASKER
tks