CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML





Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.microsoft_application_blocks Tags:
Item Type: NewsGroup Date Entered: 5/22/2005 3:47:59 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 28 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
mystic_fm
Asp.Net User
Updating multiple related tables via UpdateDataset?5/22/2005 3:47:59 PM

0/0

Am I missing something, or is it not really possible to use UpdateDataset() with a dataset that includes multiple tables with relational integrity requirements between them?  Since UpdateDataset() evidently performs all of the inserts, updates and deletes for a single table at the time it is called, how can it possible reconcile both deletions and insertions using multiple calls to UpdateDataset(), one for each table in the dataset, without violating database constraints (on child records needing to have parents, for example) in at least some cases?  Out of desperation, I've tried virtually every possible combination of settings for relational integrity (cascading vs. not) in the dataset and every order for the multiple calls to UpdateDataset() (since it only operates on one table per call) ... and in every case one of the database stored procs at some point complains that they are either being asked to delete nonexistent records or else leave records orphaned.  And I've yet to find any example of UpdateDataset() being used other than on a dataset with a single flat table, which suggests to me that it may not be intended for use in more complex database update scenarios.

What do you experienced DAAB developers do when you need to update a hierarchy of related tables from a single dataset?  If you don't use UpdateDataset(), what do you use instead?  Do I need to go outside of the DAAB and back to pure ADO.NET to accomplish this type of thing?

(I'm using the GotDotNet DAAB rather than Enterprise Library for this, by the way (scheduling requirements), with Oracle as the underlying database engine, in case that makes any difference.)

Thanks for any advice that helps clarify how (or if) this sort of thing is supposed to work within the confines of the DAAB.
mystic_fm
Asp.Net User
Re: Updating multiple related tables via UpdateDataset?5/25/2005 3:34:39 PM

0/0

In case anyone would like to know, I worked around this problem by massaging the dataset of changes to remove any child records whose parent was also deleted before I submit it to UpdateDataset().  It still surprises me a bit that such an approach would be required ... I'd have expected the DAAB to have provided some level of built-in support for what seems like a relatively common operation.

2 Items, 1 Pages 1 |< << Go >> >|



Search This Site:


Meet Our Sponsors:



Other Resources:

AJAX xml question - asp.net_ajax.asp ... AJAX xml question, > ROOT > NEWSGROUP > Asp.Net Forum > asp.net_ajax.asp. ... updating multiple related tables via updatedataset? ...
Open Old Flash Player - macromedia.players.flash - Web Programming ... Open Old Flash Player, > ROOT > NEWSGROUP > Adobe-Macromedia Forums > macromedia.players.flash, Date: 2/25/2008 3:15: ... updating multiple related tables via ...
TheMSsForum.com >> Ado >> updating datasource using 3-tier architecture ... LINQ: querying multiple entities I have a couple entities setup with associations. ... After editing the fields I issue a tableadapter.update(dataset) command. ...
Keenan Newton's Blog : August 2004 - Posts ... anyone tried to update a multiple table dataset using the UpdateDataSet method. ... So if I am updating multiple tables, and something goes wrong in my call chain ...
Microsoft ADO .NET - Page 22 SQLDataAdapter.Update(Dataset) Not Working. DB Schema ... Filtering question with related tables. Multiple Connections for a Dataset ...
TheMSsForum.com >> Ado >> ASP/ADO/VB.NET: How to update multiple ... ... After editing the fields I issue a tableadapter.update(dataset) command. ... Handling data update errors with multiple tables Hi Its easy to trap errors such ...
Using the DataSet - Using ADO.NET with SQL Server - Developer Fusion ... ... is essentially an in-memory database, complete with multiple tables, constraints, ... dataAdapter.Update(dataSet); and the database will now contain the ...



 
All Times Are GMT