One stored procedure, one dataset, two tables

college_amy

Regular
Joined
Jan 3, 2004
Messages
83
I have one stored procedure that returns 2 different tables (no relations at all) and I have one dataset called mydataset. What I want to do is have data from one of the tables in the dataset to be displayed in a repeater, the other to be displayed page bound.
How do I reference both tables individually in the dataset if they are returned by the stored procedure.
Oh - one of the tables in the dataset can have multiple rows. The other one has only 1 row (all the time, only one row).

Thanks in advance for your help.
Amy
 
Easiest way is when you do something like:
datagrid.datasource = ds.tables(0) 'for the information in the first table returned with multiple columns (I assume you meant multiple columns? not rows)
dropdownlist.datasource = ds.tables(1) 'for the information with one column
for asp.net you must do the commands to bind the data
datagrid.databind()
dropdownlist.databind()


college_amy said:
I have one stored procedure that returns 2 different tables (no relations at all) and I have one dataset called mydataset. What I want to do is have data from one of the tables in the dataset to be displayed in a repeater, the other to be displayed page bound.
How do I reference both tables individually in the dataset if they are returned by the stored procedure.
Oh - one of the tables in the dataset can have multiple rows. The other one has only 1 row (all the time, only one row).

Thanks in advance for your help.
Amy
 
No, I meant multiple rows.
The first table has about 20 columns in its one row. This one is filtered to only return one specific order # and the information related to it.
The second table has many rows with many columns. Just depends on how many names as to how many rows.

Thanks for the info, I will try your suggestion now. :)
 
Back
Top