Hello,
I have the scenario. I m building an application either in asp.net or window application. This application is base on n-tier application model.
Let us take example of Northwind Database in SQL SERVER.
i build an asp.net page. On that page i place the grid with one template column. In that column i put HTML Table with two rows. In First row there are one combobox and two textboxes. In the second row there is another DataGrid means Inner DataGrid. I select the data from the database and bind it with page. the data is shown in my required formate. When i click on the edit button then that row comes into edit mode. At that time i insert some rows in ther inner datagrid and delete some rows and update some rows. Then i click on update button. At behind i design the 3-tier application model. Now i update my database. The changes i made must be in a transaction.
for example the tables are Order, OrderDetail in Northwind Database
The Outer DataGrid show the data from Order Table (eg, columns shown are OrderID,CustomerName,CompanyName)
The Inner DataGrid show the data from OrderDetail on the basis of OrderID from the Order Table.
I have two classes in business layer
one is BusinessLayer.Order, second is BusinessLayer.OrderDetail
At DAL there are some methods which insert, update, and delete the records.
there are two classes OrderDAL and OrderDetailDAL.
from Page i call the update() method of BusinessLayer.Order Class.
This method call the Update() method of OrderDAL, and second call is Update() of BusinessLayer.OrderDetail class
The Update() method of BusinessLayer.OrderDetail call the Update() method of OrderDetailDAL.
My Problem is i want to do all this things in one transaction. How Can I do that?
The second question is Where i start the transaction (I think In business layer bcoz i call all methods here).
Then next Question is What is the better approach of Transaction in this scenario, I mean to ask whether .Net Transaction is Better or MTS DTC (COM+) Transaction
If Some One Answers that Manual transaction (.Net Transaction) is better. Then please explain how can i make that Business Layer Method to maintain a transaction.
I m not using Business Layer CRUD Behaviour.
Thanks
Muhammad Jamil Nawaz 2 1913
Hi Muhammad:
In general I'd only recommend using MSDTC if your transactions need to
be distributed across multiple servers, otherwise it only adds
complications and overhead to what can be a simple transaction you
start in your business layer.
--
Scott http://www.OdeToCode.com/blogs/scott/
On Tue, 29 Mar 2005 15:35:06 +0500, "msnews.microsoft.com"
<ja*******@hotmail.com> wrote: Hello,
I have the scenario. I m building an application either in asp.net or window application. This application is base on n-tier application model. Let us take example of Northwind Database in SQL SERVER. i build an asp.net page. On that page i place the grid with one template column. In that column i put HTML Table with two rows. In First row there are one combobox and two textboxes. In the second row there is another DataGrid means Inner DataGrid. I select the data from the database and bind it with page. the data is shown in my required formate. When i click on the edit button then that row comes into edit mode. At that time i insert some rows in ther inner datagrid and delete some rows and update some rows. Then i click on update button. At behind i design the 3-tier application model. Now i update my database. The changes i made must be in a transaction.
for example the tables are Order, OrderDetail in Northwind Database The Outer DataGrid show the data from Order Table (eg, columns shown are OrderID,CustomerName,CompanyName) The Inner DataGrid show the data from OrderDetail on the basis of OrderID from the Order Table.
I have two classes in business layer one is BusinessLayer.Order, second is BusinessLayer.OrderDetail
At DAL there are some methods which insert, update, and delete the records. there are two classes OrderDAL and OrderDetailDAL.
from Page i call the update() method of BusinessLayer.Order Class. This method call the Update() method of OrderDAL, and second call is Update() of BusinessLayer.OrderDetail class The Update() method of BusinessLayer.OrderDetail call the Update() method of OrderDetailDAL.
My Problem is i want to do all this things in one transaction. How Can I do that? The second question is Where i start the transaction (I think In business layer bcoz i call all methods here). Then next Question is What is the better approach of Transaction in this scenario, I mean to ask whether .Net Transaction is Better or MTS DTC (COM+) Transaction If Some One Answers that Manual transaction (.Net Transaction) is better. Then please explain how can i make that Business Layer Method to maintain a transaction. I m not using Business Layer CRUD Behaviour.
Thanks
Muhammad Jamil Nawaz
I'd suggest reading Tim Ewald's "Transactional COM+". Even though COM+ is
in the title, his book is still very approproate on design of transactional
systems in .NET.
-Brock
DevelopMentor http://staff.develop.com/ballen Hello,
I have the scenario. I m building an application either in asp.net or window application. This application is base on n-tier application model. Let us take example of Northwind Database in SQL SERVER. i build an asp.net page. On that page i place the grid with one template column. In that column i put HTML Table with two rows. In First row there are one combobox and two textboxes. In the second row there is another DataGrid means Inner DataGrid. I select the data from the database and bind it with page. the data is shown in my required formate. When i click on the edit button then that row comes into edit mode. At that time i insert some rows in ther inner datagrid and delete some rows and update some rows. Then i click on update button. At behind i design the 3-tier application model. Now i update my database. The changes i made must be in a transaction. for example the tables are Order, OrderDetail in Northwind Database The Outer DataGrid show the data from Order Table (eg, columns shown are OrderID,CustomerName,CompanyName) The Inner DataGrid show the data from OrderDetail on the basis of OrderID from the Order Table. I have two classes in business layer one is BusinessLayer.Order, second is BusinessLayer.OrderDetail At DAL there are some methods which insert, update, and delete the records. there are two classes OrderDAL and OrderDetailDAL.
from Page i call the update() method of BusinessLayer.Order Class. This method call the Update() method of OrderDAL, and second call is Update() of BusinessLayer.OrderDetail class The Update() method of BusinessLayer.OrderDetail call the Update() method of OrderDetailDAL. My Problem is i want to do all this things in one transaction. How Can I do that? The second question is Where i start the transaction (I think In business layer bcoz i call all methods here). Then next Question is What is the better approach of Transaction in this scenario, I mean to ask whether .Net Transaction is Better or MTS DTC (COM+) Transaction If Some One Answers that Manual transaction (.Net Transaction) is better. Then please explain how can i make that Business Layer Method to maintain a transaction. I m not using Business Layer CRUD Behaviour. Thanks
Muhammad Jamil Nawaz This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Darren Dale |
last post by:
Hello,
def test(data):
i = ? This is the line I have trouble with
if i==1: return data
else: return data
a,b,c,d = test()
|
by: Lew |
last post by:
Hi,
If I want to recover my database to just before a certain
transaction occurred how do I do it? How do I determine the exact
timestamp to rollforward to. I remember years ago when I worked...
|
by: Lyn |
last post by:
I have a form set to Single Form mode with which I can cycle through the
records in a table via Next and Previous buttons. To avoid users pressing
the Previous button on the first record and the...
|
by: John Lee |
last post by:
Hi,
I have few questions related to .NET 2.0 TransactionScope class behavior:
1. Check Transaction.Current.TransactionInformation.DistributedIdentifier to
identify if distributed transaction...
|
by: Andrew Walsh |
last post by:
Hello,
I'm wondering if postgres has a way to determine the last transaction
time (and even better, what the transaction was). I've read through
the mail list archives and the only thing I've...
|
by: Martin Robins |
last post by:
I am currently looking to be able to read information from Active Directory into a data warehouse using a C# solution. I have been able to access the active directory, and I have been able to return...
|
by: Daniel R. Rossnagel |
last post by:
As I can determining if string can be turned to a numerico value?, since to
contain alfanumeric data it returns an error to me.
as I can avoid the following error?
String str="123";
int valInt...
|
by: tubby |
last post by:
Silly question, but here goes... what's a good way to determine when a
file is an Open Office document? I could look at the file extension, but
it seems there would be a better way. VI shows this...
|
by: Jeff Kish |
last post by:
Hi.
I am between beginner and intermediate level of knowledge of sql server.
I am dealing with an sql server 2005 situation (oracle also but thats another
thread/story).
I need to assemble a...
|
by: Gordon |
last post by:
I am currently working on some code for my CMS that creates a site
folder, then creates all the necessary child folders inside it. The
method that creates folders needs to insert into 2 tables so...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
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...
|
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...
|
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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |