Home All Groups Group Topic Archive Search About
Author
30 Jan 2006 5:21 PM
ted
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

Author
30 Jan 2006 6:24 PM
W.G. Ryan - MVP
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.
Show quote
"ted" <t**@united.com> wrote in message
news:%23sBh6IcJGHA.2036@TK2MSFTNGP14.phx.gbl...
> 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
>
Author
30 Jan 2006 6:49 PM
ted
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

Show quote
"W.G. Ryan - MVP" <WilliamRyan@nospam.gmail.com> wrote in message
news:eaKegocJGHA.1188@TK2MSFTNGP14.phx.gbl...
> 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.
> "ted" <t**@united.com> wrote in message
> news:%23sBh6IcJGHA.2036@TK2MSFTNGP14.phx.gbl...
>> 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
>>
>
>
Author
31 Jan 2006 6:23 AM
Cor Ligthert [MVP]
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

Show quote
"ted" <t**@united.com> schreef in bericht
news:%23sBh6IcJGHA.2036@TK2MSFTNGP14.phx.gbl...
> 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
>

AddThis Social Bookmark Button