Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filling tables in a dataset
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Filling tables in a dataset
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01123034
Message ID:
01123034
Vues:
59
I have a dataset with two tables. I know I can fill the tables independently using a a data adaper for each of the tables. Something like this:
MyDataSet myDataSet = new MyDataSet();

SqlDataAdapter adapter1 = new SqlDataAdapter("SP1", sqlConnection);
adapter1.Fill(myDataSet, myDataSet.Table1.TableName);

SqlDataAdapter adapter2 = new SqlDataAdapter("SP2", sqlConnection);
adapter2.Fill(myDataSet, myDataSet.Table2.TableName);
(I think that code would compile <s>)

Anywho is there a way to construct a stored procedure to return multiple "datasets" so that I can fill both Table1 and Table2 using one stored procedure? (maybe Table1 is the parent table and Table2 is the child table)

How do you do this?

Thanks,
Einar
Semper ubi sub ubi.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform