Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OleDBDataAdapter.Update
Message
De
27/02/2005 18:39:26
 
 
À
27/02/2005 17:43:34
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00991026
Message ID:
00991047
Vues:
15
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform