By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,041 Members | 1,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,041 IT Pros & Developers. It's quick & easy.

Changing a dataset table rows datasetstate

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Try adding the row, then calling AcceptChanges() on the row, then modifying
one of the columns.

--
Regards,

Tim Ellison
"-=JLK=-" <No***********@nospam.com> wrote in message
news:uJ**************@TK2MSFTNGP11.phx.gbl...
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

Nov 20 '05 #2

P: n/a
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.

"Tim Ellison" <ti*******@earthlink.net> wrote in message
news:O6*************@TK2MSFTNGP09.phx.gbl...
Try adding the row, then calling AcceptChanges() on the row, then modifying one of the columns.

--
Regards,

Tim Ellison
"-=JLK=-" <No***********@nospam.com> wrote in message
news:uJ**************@TK2MSFTNGP11.phx.gbl...
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


Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.