Hi,
I have a dataset that is filled with data from the db. The user has
modified that data in one of the tables where some of fields should now be
null. I have played around with delete the row and adding a new row but
have problems with the update. Do you think I should just reset the row by
looping through the row and setting all the values to null before I update
changes to the row?
Thanks
W.G. Ryan - MVP - 30 Jan 2006 18:24 GMT
Ted:
What specifically is the problem? If you delete the row and call Update, if
the adapter is configured properly, then the row should disappear from the
db b/c it's deleted. The Adapter should do that for you on Update. If you
just need the values in the dataRow to be null, then yes, just setting them
locally should do it for you. Let me make sure I understand the problem
before proceeding though.
> Hi,
>
[quoted text clipped - 6 lines]
>
> Thanks
ted - 30 Jan 2006 18:49 GMT
Thanks for the post. See I do not update until after I delete the row and
add the new row. The dataset is quite large with multiple tables and there
is alot of changes going into all of the tables. I think it is better if I
just set the row values to null.
Thanks
> Ted:
>
[quoted text clipped - 14 lines]
>>
>> Thanks
Cor Ligthert [MVP] - 31 Jan 2006 06:23 GMT
Ted,
Are you sure that you use a "delete" method to delete row and not a "remove"
method.
The "remove" methods removes everything from the datatable. The "delete"
signs the row to be deleted by the next update or by an acceptchanges.
I hope this helps,
Cor
> Hi,
>
[quoted text clipped - 6 lines]
>
> Thanks