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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keeping a recordset available 1

Status
Not open for further replies.

Tve

Programmer
May 22, 2000
166
FR
Hi,

I'm new at ASP, so my question may seem silly, but here I go.

I've been reading a lot of docs. I understand how to create a database connection and a recordset object with a SQL statement. But how do I actually save the recordset for further use?

This is what I am trying to acheive:

1. Use getdata.asp to retrieve data from data source and show data to user.
2. Use filterdata.asp to let the user filter the data and show the filtered result.

I presume I should create the recordset in getdata.asp. How do I maintain the recordset for filterdata.asp to avoid accessing the data source a second time?

All advice would be very useful.

Thanks in advance.

Thierry
 
Two options -- RDS -- Remote data services where you can save the recordset on a client (I doubt this one is going to be good for you)

Put the recordset into a session object like this:
set session("recordset") = theRecordset

Pick it back up like this:
set theRecordset = session("recordset")

Session recordsets are NOT a good idea for high traffic sites as they tie up too many resources. For low traffic sites, they are fine, and they do make coding a little easier.

However, if you expect many users at once to be using the site, it's better to just get the new recordset each time -- it might not seem like it, but performance will actually be better --

hope it helps! :)
Paul Prewett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top