
October 31st, 2000, 11:21 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,578
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
<i><b>Originally posted by : </b></i><br />that is one way to do it if you can keep your recordset open for a long duration. you are executing sql, however i am calling a COM component that creates the recordset and we share the recordset space. The recordset must be closed within the same asp page. My strategy is to save the recorset to a file.<br /><br />first create a connection to the COM component<br />Set Conn = Server.CreateObject("COM component name")<br /><br />then i call the component method that gives me the recordset<br /><br />Set rsUsers = Conn.IGetRecordset()<br /><br />then i save the recordset to a file<br /><br />rsUsers.save "C:/temp/recorsetname.rs", adPersistADTG<br /><br />the close the recordset<br /><br />rsUsers.Close<br />Set rsUsers = Nothing<br /><br />then in the same page i can open up the recordset from the file<br /><br />Set myuser = Server.CreateObject( "ADODB.Recordset" )<br /><br />myuser.open "C:/temp/recorsetname.rs", "Provider=MSPersist",,,adCmdFile<br />then save this RS to the session object<br /><br />Session("persistent_recordset") = myuser<br /><br />now, i can access this recordset from any <br />asp page<br /><br />----- new page ----<br />set rs = session("persistent_recordset") <br /><br />my final probelm is figuring out where to open/close it, how to specify cursor types.<br /><br />food for thought....<br /><br />------------<br /> at 10/30/2000 4:02:19 PM<br /><br />tmk,<br /><br /> You can save a recorset to a Session variable by:<br /><br /> Set Session("rs") = Server.CreateObject("ADODB.Recordset")<br /> then you want to execute your SQL<br /> ...<br /> Session("rs").Open<br /><br />The only thing to remember is that all of the records will be save in a session variable, meaning taking lots of storage for each user that is going to visit those pages.<br /><br />I know what you are talking about since I am facing the same dilema. Try to just display so many records at a time like 10 and have a drop down where the user can "jump" to a specific record in the database.<br /><br />If you have any more Q's let me know.
|