Home > ASP Development > Form pass variable to recordset2 from recordset1

Form pass variable to recordset2 from recordset1



hi,

i would like to have a recordset1 to get results from query string

then take an item from recordset1 in a form to submit to recordset 2 and get results

So then page give results:



Recordeset1name - Recordeset1age - Recordeset1date



recordset2age (based on results from Recordeset1)



any ideas?

    
Guest


not too sure... but hopefully this would help:


Code:



sql = "Select * from table where field ="&querystringitem
Set RS1 = objConn.Execute(sql)

'to get the Recordeset1name - Recordeset1age - RS1("Recordeset1date") just do
RS1("Recordeset1name")
RS1("Recordeset1age ")
RS1("Recordeset1date")

'if it were just to get a record in Recordset2 than
sql2 = "Select * from table where field ="&RS1("unique value")
Set RS2 = objConn.Execute(sql2)



Was this answer helpful ? Yes No   
Guest


should it be:


Code:


RS1("(Recordset1.Fields.Item("name").Value)")






or just


Code:


RS1("Recordeset1name")






both didn't work anyway

Was this answer helpful ? Yes No   
Guest


try doing a response.write to see if the value is passed....



if its a int u dont have to use '' but if its a text u gotta use ''

='"&querystringitem&'';'"

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved