Changing a dataset table rows datasetstate

J

-=JLK=-

All,

Is there a way to add a new row to a dataset but make it think it is
changed data and should perform an "Update" rather than insert when the
update() method is called?

Thanks,

JamesK
 
T

Tim Ellison

Try adding the row, then calling AcceptChanges() on the row, then modifying
one of the columns.
 
J

-=JLK=-

My concern there would be the type of update statement generated. Would it
try to include as "original" column data the column as it looked before the
second modification? If the update statement includes only the Primary Key
it would be OK but I thought it tried to include all changed columns by
default?

Thanks,

James K.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top