Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

How to define source value for filtered recordset (ASP)

New Here ,
Jun 11, 2009 Jun 11, 2009

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

TOPICS
Server side applications

Views

596
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 14, 2009 Jun 14, 2009

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.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 15, 2009 Jun 15, 2009

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.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 15, 2009 Jun 15, 2009

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines