You can use the same existing connection. Or, depending on what you're
doing, you may be able to grab all the data in one query. But, there's
nothing wrong with creating and using two recordsets within the same page.
I think that you should read this though.
http://www.aspfaq.com/show.asp?id=2424
Dim objConn, RS1, RS2, strQ, strConnection
strConnection = "It'd be in your best interests to use an oledb connection
string here. See www.connections trings.com"
Set objConn = CreateObject("A DODB.Connection ")
strQ = "SELECT StaffName FROM tbStaff"
Set RS1 = objConn.Execute (strQ)
strQ = "SELECT CorrectType FROM Corrections"
Set RS2 = objConn.Execute (strQ)
'''stuff you need to do
objConn.Close : Set objConn = Nothing
Ray at work
"Vincent Jones" <vn****@hotmail .com> wrote in message
news:ba******** *************** ***@posting.goo gle.com...
I have this:
<%
Dim objConn, RS, strQ, strConnection
Set objConn = Server.CreateOb ject("ADODB.Con nection")
strConnection = "DSN=Developmen t;Database=PMA_ Internet;"
objConn.Open strConnection
Set RS = Server.CreateOb ject("ADODB.Rec ordset")
Set RS.ActiveConnec tion = objConn
strQ = "Select StaffName From tbStaff"
RS.Open strQ
%>
But I now want to connect to another table. Do I close the connection
and start over again to create 'strQ = "Select CorrectType from
Corrections'?
Thanks.