Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / January 2006

Tip: Looking for answers? Try searching our database.

DataSet Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ted - 30 Jan 2006 17:21 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.