Deleting a row

  • Thread starter Thread starter Ronny
  • Start date Start date
R

Ronny

When deleting a row I set the SelectCommand property in order to create the
dataset and the DeleteCommand property.
Do I have to set the InsertCommans and the UpdaeCommand also?

Regards
Ronny
 
Thanks,
But this is exactly my question...
When using Update, in order to push data back to the database the ADO.NET
uses the prepared command automatically and I don't know if it needs also
those that I mentioned.
Regards
Ronny
 
if you have a identity key from your select
then the update will only up rows that were changed

I always build my own update command using the table.schema....
SqlcommandBuilder works wonders
for most if not all normal updates

work with it with test data till u get a handle with adapter.update()

try sqlcommandbuilder print the commands it creates out
so you can see what it is acually doing

DaveL
 
Yes,

But as Dave wrote, in most simple situations (by instance less than 100
columns, no broken columnnames and no relations) you can use the
commandbuilder much easier.

Cor
 
Back
Top