Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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

Posted

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. :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...