Sunday, March 25, 2012

Dataset with multiple tables is not getting populated

Hi,

I have a stored proc which returns multiple result sets. These results sets I am capturing using a strongly typed dataset which in turn I am using to display in the code. My dataset will have 5 tables. However when I run the code only 3 tables get populated and the remaining 2 gets no data.

I have seen the problem earlier and could not resolved it. Please let me know if any one can help.

Thanks in advance

Rohit

From your description, i think it really has no records.

because you can really see five tables without any error.

it means the SP does populate five tables and pass them to Dataset.

|||

Hi

Thanks for your reply.

There is data in the database and when I run the sproc directly through the execute command it returns me the results that I want i.e. all the 5 tables with the rows. However when I use the data adapter method using the fill dataset it just populates fhe first 3 tables and the next 2 are blank. Between the tables in the strongly typed dataset I have no relations set either.

Thanks in advance.

|||Try to useSqlDataAdapter to fill a DataSet, instead of using strongly typed dataset.sql