TheCandyman
Technical User
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....
-------------------------------------------------
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....