Link to home
Create AccountLog in
Avatar of louise_8
louise_8

asked on

displaying records via ASP from an sql query which uses fetch/cursor

Hi,

I have a query which uses a cursor/fetch to return a number of records.
It returns them like this
productname budget  brand
abc                   1300     A
efg                   1000     A
productname budget  brand
abc                   1500     B
efg                   1900     B

In my asp page when I loop through the recordset I just get the first section.

How do I loop through so that I can also access the second and subsequent set of records
ie in my example above Brand B

Thanks
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

If I remember well, with adodb recordset, once you are at eof, you can get the .nextrecordset method of the recordset. This may return what you need.
Otherwise please clarify what you have already as code
Avatar of louise_8
louise_8

ASKER

thanks

that works for the next one

what do you suggest for looping through all the recordsets, cant see any good examples online and not sure how to find out how many recordsets there are within my asp code?

The amount of recordsets returned is dynamic

Cheers
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
perfect thanks