PC Review


Reply
Thread Tools Rate Thread

Datatable Update method not updating

 
 
Flomo Togba Kwele
Guest
Posts: n/a
 
      30th Jul 2007
I have a dataset containing a datatable. Everything was working OK. Then I changed the definition
of one of the columns from not null to nullable. Now when I update the adapter, the change is not
being written to the DB.

Just before the update, I looked at the data in the datatable by walking through the datarows, and
it contains the expected value for the row and column I'm interested in. The very next statement is
the Update.

What could be causing this? What tools can I use to diagnose this further?

Thanks, Flomo
--

 
Reply With Quote
 
 
 
 
WenYuan Wang [MSFT]
Guest
Posts: n/a
 
      31st Jul 2007
Hello Flomo,

In general, ADO.net will check if the original value exists in the
underlying database, and then update the current value to database.

What does the update SQL statement looks like in your application?
Additionally, have you check the original version value?

I'd like to recommend SQL Profile tool to diagnose such issue, if
underlying database is SQL server.
1, open SQL Profile
2, create a new trace
3, start trace.
4, reproduce the issue (Modify the dataset and update the dataset to
underlying database)
5, stop the trace
6, save the trace log as .trc file

Would you please post the trace log in the newsgroup? Thus, we will perform
further analyze.

Have a great day,
Best regards,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
Earl
Guest
Posts: n/a
 
      4th Aug 2007
If you don't want to manually dig through the generated code, simply
recreate your command objects for insert and update.

"Flomo Togba Kwele" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a dataset containing a datatable. Everything was working OK. Then I
>changed the definition
> of one of the columns from not null to nullable. Now when I update the
> adapter, the change is not
> being written to the DB.
>
> Just before the update, I looked at the data in the datatable by walking
> through the datarows, and
> it contains the expected value for the row and column I'm interested in.
> The very next statement is
> the Update.
>
> What could be causing this? What tools can I use to diagnose this further?
>
> Thanks, Flomo
> --
>



 
Reply With Quote
 
Flomo Togba Kwele
Guest
Posts: n/a
 
      8th Aug 2007
I gave up on this and reverted to an older version which worked.

I am sorry I didn't have time to try the suggestions, but I do thank you for them.

Flomo
--



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Issues w/ using a DataTable with a TableAdapter's Update method Craig Buchanan Microsoft ADO .NET 1 18th Jul 2008 01:31 PM
Issues w/ using a DataTable with a TableAdapter's Update method Craig Buchanan Microsoft VB .NET 1 18th Jul 2008 01:31 PM
Help with DataTable update (BeginLoadData method) Mike Microsoft ASP .NET 1 5th Dec 2003 03:24 AM
Help with DataTable update (BeginLoadData method) Mike Microsoft VB .NET 1 5th Dec 2003 03:24 AM
Help with DataTable update (BeginLoadData method) Mike Microsoft ADO .NET 3 5th Dec 2003 03:24 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:21 PM.