college_amy Posted December 12, 2005 Posted December 12, 2005 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 Quote
hsueh001 Posted December 12, 2005 Posted December 12, 2005 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() 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 Quote
college_amy Posted December 12, 2005 Author Posted December 12, 2005 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. :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.