faqts : Computers : Programming : Languages : Asp : ASP/VBScript : Common Problems

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

64 of 87 people (74%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

Can I pass Recordset from one page to another?
Can I use session variable to pass Recordset from one page to another?

May 17th, 2000 21:29
unknown unknown, Michiel van Otegem


Yes, you can. It's inadvisable though (read
http://www.learnasp.com/learn/nosessionobjects.asp). Better is to 
persist the recordset as an array, regular string or an XML string, 
using respectively GetRows, GetString or the ADO. Save method with 
adPersistXML.
Still if you do this at session level, try imagining what would happen 
if you have 2000 users in a 20 minute timespan. You'd have 2000 
recordsets persisted in memory! If the query is the same for different 
users, you could easily do this with Application vars though. You could 
also store the XML string in a file for each session and use the MSXML. 
Load method to load it when needed.
My advice: rethink your strategy and see if you REALLY need to do this.
Storing just the SQL string you used essentially gives you the same
functionality with much less resource impact.



© 1999-2004 Synop Pty Ltd