Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple RecordSets??

Status
Not open for further replies.

TheCandyman

Technical User
Sep 9, 2002
761
0
0
US
Is it possible to have multiple recordsets like below so i only have to setup a connection to the DB once???

-------------------------------------------------
Dim myConn3,myPath3
Set myConn3 = Server.CreateObject("ADODB.Connection")
myPath3 = Server.MapPath("Accessdb/WEBDB.mdb")
myConn3.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & myPath3 & " ;"

Dim rs3, mySQL3
Set rs3 = Server.CreateObject("ADODB.RecordSet")
mySQL3 = "SELECT * FROM WEBDATA WHERE web_page LIKE '1'
rs3.Open mySQL3, myConn3

Dim rs2, mySQL2
Set rs2 = Server.CreateObject("ADODB.RecordSet")
mySQL2 = "SELECT * FROM WEBDATA WHERE web_page LIKE '2'
rs3.Open mySQL2, myConn3

Dim rs, mySQL
Set rs = Server.CreateObject("ADODB.RecordSet")
mySQL = "SELECT * FROM WEBDATA WHERE web_page LIKE '3'
rs3.Open mySQL, myConn3


** then close connection and all recordsets....

 
Hi CandyMan

Interesting question

Did you try it?

and did it work?

Jay
 
Just so everyone knows, i tried it and it speeds up the final display tables a lot. Can't believe i didn't try or think of this a while ago.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top