Copy link to clipboard
Copied
Hi,
I'm using ASP & CS4. I have a search page which upon submission sends form parameters to a results page. The results page matches the search parameters to a recordset and returns the appropriate record/s.
How can I take one of the values from the returned filtered recordset (which wasn't one of the original variables/parameters), and use it as a value to filter another recordset from another table? Do I have to create a parameter from that value, or can it be done in a SQL statement?
Many thanks
Copy link to clipboard
Copied
So,
does any one know how I can generate form or URL parameters, or session variables, from certain information returned by my filtered recordset on my results page? Any help would be greatly appreciated.
Copy link to clipboard
Copied
How many results are returned from the first recordset? Where is the second recordset to be displayed?
If the first RS returns a single row and the second RS is displayed on the same page, you don't need to create anything. Just use the value of the column you want in the SQL statement. If you need to pass the value to another page, you can either set a session variable or pass the value in the querystring.
Copy link to clipboard
Copied
Oh, and if you are just asking whether or not you need to use a parameterized query, no, you do not. You can simply reference the RS variable directly in the select statement.