Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert Data
Message
De
19/04/2003 17:46:09
 
 
À
19/04/2003 05:54:58
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Divers
Thread ID:
00779465
Message ID:
00779535
Vues:
17
This message has been marked as a message which has helped to the initial question of the thread.
Mufi,

To add a record to your DataSet:
DataRow row = MyDataSet.Tables[0].NewRow();
MyDataSet.Tables[0].Rows.Add(row);
To use your Stored Procedure:
SqlCommand sc = new SqlCommand("MyInsertStoredProc", MyConnection);
sc.CommandType = CommmandType.StoredProcedure;
sc.Parameters.Add("@MyPK", MyPK);
// Add all other parameters here

SqlDataAdapter da = new SqlDataAdapter(sc);
da.Fill(MyDataSet)
HTH,
~~Bonnie


>Hi everybody,
>
>I want insert record in data source through data set.
>I want insert record in data set then insert in data source via stored procedure,how?
>
>Thank in advance
>
>Mufi
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform