Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OleDBDataAdapter.Update
Message
From
27/02/2005 18:39:26
 
 
To
27/02/2005 17:43:34
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00991026
Message ID:
00991047
Views:
16
To add rows to your DataTable, try this on for size:
DataRow row = MyTable.NewRow();
row["MyColumn"] = "whatever";
MyTable.Rows.Add(row);
I don't have any particular step-by-step to recommend off the top of my head. I don't think I have anything good bookmarked at the moment. But, maybe the above example will get you started?

~~Bonnie


>Good guess, you're right.
>
>Problem is I couldn't find any hint in help. The documentation is limited to tell you what a specific method does. In Update's case, it says "it will update your backend" or something like that. Well... i set the insert command, I set the parameters and I expected to do the job. Now I see that there is a table underlying. In this case, how to add records to _that_ table? I'm still in the same point. All i need is to add a record to that table, in a way or another.
>
>Thanks,
>Grig.
>
>P.S. Can you point me to a documentation that explain this step-by-step, in plain english? :)
>
>Thanks a lot.
>
>>Hey Grig,
>>
>>You're mixing apples and oranges here. If you're going to use the Update() method, you don't specify the parameters. The Update() method will go through your Table and insert the records that are marked as Added. It will set up the parameters for you. My guess is that you don't have any rows to add ... either you've already done an AcceptChanges() on your DataTable, or you didn't insert a row into it.
>>
>>~~Bonnie
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