Disconnected recordsets to a Session in ASP Classic
Posted on 2007-10-11
I have a search page, that when a search term is entered, it posts back to itself and makes the call to my database and returns the results of the search.
I would like to be able to display a list of the recent searches in a display table. I am trying to use a disconnected recordset, but since the page posts back to itself, everyime I run a search it rebuilds the disconnected recordset (drs) and only displays the most recent search.
I tried passing the drs to a Session using the following:
Set drs = Session("drs")
drs("search") = Request.form("search")
Set Session("drs") = drs
NOW, the error I'm getting says: "Object required: 'session(...)'", pointing to the second line of code.
(Microsoft VBScript runtime (0x800A01A8)
Initially, when it was resetting itself I had to declare the drs by:
If someone could help get this in and out of the Session I'd appreciate it.
The end result is when the searches are displayed, I'm going to uses a standard do while loop to make each search in the drs appear on a seperate row so I can use href to make them links.