Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Loading DataTables in a strongly typed DataSet
Message
De
02/02/2004 10:51:23
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
 
 
À
02/02/2004 10:27:54
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00872899
Message ID:
00872972
Vues:
36
Bonnie,

Thanks for your response. When I created my dataset, the datatables were names Table0, Table1,Table2, etc. I renamed these to more meaningful names, but I think this probably broke the loading from the stored procedure. When I do a QuickWatch, I get twice the number of tables.

Any ideas?

TIA

Rex



>Is it possible to load data into the datatables using the same stored procedure or do I need to load each datatable separately?
>
>Rex,
>
>Yes, you can use the same SP to load the data. Just use DataAdapter.Fill(MyDataSet) as you would for loading data into any dataset. Just be sure that the SqlCommand is the name of your SP. Something like this:
>
>SqlCommand sc = new SqlCommand("MySP", this.MyConnection);
>sc.CommandType = CommandType.StoredProcedure;
>sc.Parameters.Add("@MyPK", MyPKValue);
>SqlDataAdapter da = new SqlDataAdapter(sc);
>
>da.Fill(MyDataSet);
>
>
>~~Bonnie
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform