One of the features of the ADO Recordset in ADO 2.5 is the ability to save the recordset to a disk file. There are currently two file formats that you can use. The first, and default, is called the Advanced Table DataGram Format. This file format will allow you to reload the recordset by specifying its filename as the source when you open your recordset. Here's the code for saving the recordset:
Dim dcnDB ' As ADODB.Connection
Dim rsData ' As ADODB.Recordset
Set dcnDB = Server.CreateObject("ADODB.Connection")
dcnDB.ConnectionString = _
"Provider=SQLOLEDB;" _
& "Data Source=Server;" _
& "Initial Catalog=DB;" _
& "User ID=user;" _
& "Password=password;"
dcnDB.Open
Set rsData = dcnDB.Execute("SELECT * FROM Customers")
rsData.Save "C:\DataFile.txt"
rsData.Close
dcnDB.Close
To reopen this file, you do the reverse:
Dim rsData ' As ADODB.Recordset
Set rsData = Server.CreateObject("ADODB.Recordset")
rsData.Open "C:\DataFile.txt"
Do Until rsData.EOF
Response.Write rsData("CompanyName") & "
"
rsData.MoveNext
Loop
rsData.Close
If you have a need to save searches, this is a fairly straightforward to do it. You save the results to a file and then you can reload them later.