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

Recordset does not return expected results

LEGEND ,
Jan 09, 2008 Jan 09, 2008

Copy link to clipboard

Copied

DW 8.02 - ASP/VBScript/Access -
I have a page with two recordsets. The first recordset correctly returns 2
rows from the database. The second recordset relies on a variable set from a
value returned in the first recordset, but will only return the rows
associated with the first value from the first recordset; it does not return
the row associated with the second row in the first recordset. I have the
repeat regions... could I get a clue from someone?


1st recordset -
Select column1 from table1 where blah blah
Correctly returns two rows

2nd recordset
Select columnA from table2 where ColumnB = Table1.Column1
Returns only the first result from first recordset

Also tried this -
2nd recordset
Select columnA from table2 where ColumnB in (Select Column1 from Table1)
Returns only the first result from first recordset

TOPICS
Server side applications

Views

346
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 ,
Jan 10, 2008 Jan 10, 2008

Copy link to clipboard

Copied

Really cannot tell from the info below. A sample of the data and the
actual queries, especially the second one, would be helpful.


Ted Dawson wrote:

> DW 8.02 - ASP/VBScript/Access -
> I have a page with two recordsets. The first recordset correctly
> returns 2 rows from the database. The second recordset relies on a
> variable set from a value returned in the first recordset, but will
> only return the rows associated with the first value from the first
> recordset; it does not return the row associated with the second row
> in the first recordset. I have the repeat regions... could I get a
> clue from someone?
>
>
> 1st recordset -
> Select column1 from table1 where blah blah
> Correctly returns two rows
>
> 2nd recordset
> Select columnA from table2 where ColumnB = Table1.Column1
> Returns only the first result from first recordset
>
> Also tried this -
> 2nd recordset
> Select columnA from table2 where ColumnB in (Select Column1 from
> Table1) Returns only the first result from first recordset



--

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 ,
Jan 10, 2008 Jan 10, 2008

Copy link to clipboard

Copied

Tryusing Tom Muck's nested recordset extension.

--
Jules
http://www.charon.co.uk/products.aspx
Charon Cart
Ecommerce for ASP/ASP.NET



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 ,
Jan 10, 2008 Jan 10, 2008

Copy link to clipboard

Copied

LATEST
Here it is....
http://www.fwzone.net/showDetail.asp?NewsId=394&ZoneId=1


Thanks to you guys for trying.



Ted

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