Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert Data
Message
From
19/04/2003 17:46:09
 
 
To
19/04/2003 05:54:58
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Miscellaneous
Thread ID:
00779465
Message ID:
00779535
Views:
18
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform