This is going to be a long one, I will try and keep it short and to the
point. I am writing a program that searches an assessor database for
information about different types of parcels within a county. This is
seamingly an easy thing to do but now that I have been programming I am
running into a curious problem. The component that is causing the problem
is the recordset object. In any given instance a user can type in their
name, address or parcel number and get a list of comparable properties for
that parcel. Their are 8 different types of property ranging from
residential to commercial. I am trying to use the ADO recordset object to
parce through two recordsets at a time the first recordset simply brings
back a property type identifier and the second recordset brings back cursor
or virtual table. I then set a session variable uniquely assigned to handle
1 property type and then I set a session object that contains the cursor.
This is where the problem occurs. I am using a loop to iterate through the
multiple recordsets (actually there are 8 sets of two recordsets possible).
I iterate through 2 recordsets at a time setting the identifier and the
actual recordset containing the data to a session variable and object
respectively. In the midst of this loop I call an include file that
contains shortcut logic that will display an html button for each type of
property that the database has returned. The button has a hidden variable
that associates it with a property type file, when pressed it calls another
asp page that determines what property type is being requested and
redirects the request to that asp page. The asp page then loads the session
object containing the recordset and subsequently pages through the data
displaying it to the user. The only problem is that the session object does
not seem to be getting set with the second record set.
I have inlcuded the code inline below.
<% do
RSReturn = RS(0) ' gets the first recordset
recordtype = RSReturn
Session(recordtype & "_PROPTYPE") = RSReturn
%>
<!-- #Include file="property_button.asp" -->
<%
set RS = RS.NextRecordset
'should advance to the next recordset but does not what am I
doing wrong?
SessionRecordset = recordtype & "_RS"
Response.Write(SessionRecordset)
set Session(SessionRecordset) = RS
LOOP until RS is nothing or recordtype = "PARCELS"
End If %>
Thanks so much