473,395 Members | 1,999 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Need help with Master/Detail scenario

I have what I believe to be a typical master/detail scenario. I know how to
use a transaction on the sql updates, but what about any dataset merges? My
scenario goes like this:

// call data layer to add new header record, get back auto-inc keys
// call data layer to do all updates on detail tables, assign auto-inc keys
from header where necessary
// call data layer to do update, delete operations, if necessary, on header
record

That's the sql code, which is easy enough to do in a transaction. However,
now I need to merge the datasets returned from the data layer (possible new
auto-inc, timestamp values, etc.) with the datasets on my windows form. It
would go something like:

// merge header dataset from data layer with dataset on windows form
// merge detail dataset(s) from data layer with dataset(s) on windows form

The issue I have if what if something goes wrong in one of those merge
operations? I can roll back the sql commands, but I can't "roll back" the
previous dataset merges.

Would System.Transactions help here? Would that roll back both the sql
commands and the dataset merges? The help file is still sparse on this new
feature of 2.0.

TIA,

Mike Rodriguez
Nov 17 '05 #1
0 1077

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: ZRexRider | last post by:
Hi, I have trigger that enforces the creation of a sortorder that is always 1 digit higher than the current highest on Inserts. This trigger works great if I add one row at a time so I think...
0
by: sagdude | last post by:
I have a master detail datatable and add a relation DataRelation relation = new DataRelation("PartNoRelation", Dt_Cart.Columns, Tbl_NearestCenters.Columns,false);...
0
by: hlam | last post by:
Help - Calculating the total of a column in a data grid -- when data grid is part of Master-Detail set-up I have setup a Master-Detail form using Visual Studio.Net. A ListBox is the (Master)...
0
by: dfjhsqd | last post by:
Hi all I have a form with 2 datagrids (master-detail) and a combobox to create a filter for the masterdatagrid. The master-detail worked fine when i used a dataset like this : drelRelation...
0
by: Tmuld | last post by:
Holy Enhancements Batman. My quest - to create a web page (master.aspx) that accepts user input, that input is fed to a database which uses the input for a keyword search. The search records...
2
by: Jim | last post by:
OK....so I got a little off-topic last time....... I still want to do a simple web page like MSDN Library (http://msdn.microsoft.com/library/default.asp) with a couple of changes. On my...
4
by: Mark Olbert | last post by:
I have a website (ASPNET2) where the master page has a button in it and my login page, which is a detail page of the master page, also has a button (a login button). Everything works fine if I...
3
by: Aspnot | last post by:
I have a form that is setup in a Master/Detail configuration. The Detail section is represented with a DataGridView. Some of the columns in this DataGridView control are unbound. When a user...
0
by: Mike Wilson | last post by:
Dear group, I have an invoice entry form, which is a simple Master fields / Detail grid. The main summary information of the invoice are stored in one table in a dataset, which is bound using a...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.