Hi all,
I don't know how people deal with the issue in aspx pages:
Let's say you have a transaction through your aspx pages, in your
application program, you need to call different store procedures to insert
data to different tables. In case there is one store procedure call failed,
what would you do to other tables' data which already successfully insert
data to them?
It seems that you can create one store procedure to call all those store
procedures in database layer , in case one fails and you can rollback the
transactions,but it will have to pass to many parameters to that store
procedure, besides, what about you need to call one procedure many times
based on the application, (insert multiple rows to one table)?
In aspx page, what should I do, any special tech could make this one easy?
Any comments?
--
Betty 3 1335
Well, you can use the SqlTransaction within your data access layer to roll
back or commit. Your question is very vague because a lot of factors come
into play. Performance is a big one, your single call will cause let network
traffic, so that's good, but it'll be harder to maintain, that's bad. The
new capabilities of the Transcation objects in ADO.NET 2.0 are pretty sweet
too :)
Personally, I'd use the SqlTransaction object over multiple calls, and only
merge those calls if necessary (ie, too slow).
Karl
--
MY ASP.Net tutorials http://www.openmymind.net/
"c676228" <be****@community.nospam> wrote in message
news:A3**********************************@microsof t.com... Hi all,
I don't know how people deal with the issue in aspx pages:
Let's say you have a transaction through your aspx pages, in your application program, you need to call different store procedures to insert data to different tables. In case there is one store procedure call failed, what would you do to other tables' data which already successfully insert data to them?
It seems that you can create one store procedure to call all those store procedures in database layer , in case one fails and you can rollback the transactions,but it will have to pass to many parameters to that store procedure, besides, what about you need to call one procedure many times based on the application, (insert multiple rows to one table)?
In aspx page, what should I do, any special tech could make this one easy?
Any comments?
-- Betty
Karl,
I read the post in google newsgroup as you recommended, it's clearer and
easier.
But I need to reply you in this microsoft managed newsgroup in order to be
identified to be one perosn.
I will take your suggestion and will use sqltransaction object. I will have
leason now.
--
Betty
"Karl Seguin [MVP]" wrote: Well, you can use the SqlTransaction within your data access layer to roll back or commit. Your question is very vague because a lot of factors come into play. Performance is a big one, your single call will cause let network traffic, so that's good, but it'll be harder to maintain, that's bad. The new capabilities of the Transcation objects in ADO.NET 2.0 are pretty sweet too :)
Personally, I'd use the SqlTransaction object over multiple calls, and only merge those calls if necessary (ie, too slow).
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/
"c676228" <be****@community.nospam> wrote in message news:A3**********************************@microsof t.com... Hi all,
I don't know how people deal with the issue in aspx pages:
Let's say you have a transaction through your aspx pages, in your application program, you need to call different store procedures to insert data to different tables. In case there is one store procedure call failed, what would you do to other tables' data which already successfully insert data to them?
It seems that you can create one store procedure to call all those store procedures in database layer , in case one fails and you can rollback the transactions,but it will have to pass to many parameters to that store procedure, besides, what about you need to call one procedure many times based on the application, (insert multiple rows to one table)?
In aspx page, what should I do, any special tech could make this one easy?
Any comments?
-- Betty
Actually, I don't think I ever recommended google newsgroups, I just
mentioned it as an alternative.
I use outlook express which directly feeds into the NNTP protocol without
any fancy web interfaces.
I think you should use whatever tool you feel most comfortable with :)
Cheers,
karl
--
MY ASP.Net tutorials http://www.openmymind.net/
"c676228" <be****@community.nospam> wrote in message
news:03**********************************@microsof t.com... Karl, I read the post in google newsgroup as you recommended, it's clearer and easier. But I need to reply you in this microsoft managed newsgroup in order to be identified to be one perosn. I will take your suggestion and will use sqltransaction object. I will have leason now. -- Betty
"Karl Seguin [MVP]" wrote:
Well, you can use the SqlTransaction within your data access layer to roll back or commit. Your question is very vague because a lot of factors come into play. Performance is a big one, your single call will cause let network traffic, so that's good, but it'll be harder to maintain, that's bad. The new capabilities of the Transcation objects in ADO.NET 2.0 are pretty sweet too :)
Personally, I'd use the SqlTransaction object over multiple calls, and only merge those calls if necessary (ie, too slow).
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/
"c676228" <be****@community.nospam> wrote in message news:A3**********************************@microsof t.com... > Hi all, > > I don't know how people deal with the issue in aspx pages: > > Let's say you have a transaction through your aspx pages, in your > application program, you need to call different store procedures to > insert > data to different tables. In case there is one store procedure call > failed, > what would you do to other tables' data which already successfully > insert > data to them? > > It seems that you can create one store procedure to call all those > store > procedures in database layer , in case one fails and you can rollback > the > transactions,but it will have to pass to many parameters to that store > procedure, besides, what about you need to call one procedure many > times > based on the application, (insert multiple rows to one table)? > > In aspx page, what should I do, any special tech could make this one > easy? > > Any comments? > > -- > Betty This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mountain man |
last post by:
Greetings to all database professionals and laymen,
Let us make a bold assumption that we have developed a software
tool for the SQL Server environment which simply acts as an interface
between...
|
by: AMeador |
last post by:
I am doing a project where we need to read a write data to a
database (SQL Server 2K in this case). I have seen the use of data
binding to link a property of a control to a field in a record set...
|
by: Brett |
last post by:
If I want to easily swap the database I'm using, what is the best method for
developing that tier in my application?
I'll have basically a 4 tier app:
1. presentation
2. business logic
3. data...
|
by: Alan |
last post by:
I am coming from other programming tools field, and new to VB .NET. Just
wondering what is the common approaching in database programming in VB .NET?
1) Are you guru always using the data aware...
|
by: |
last post by:
Dear Groups,
I am trying to develop a simple client <-> server application where (for
database security reasons) the server only has access to the centralised
database (and a file repository),...
| |
by: ImOk |
last post by:
I need to program generically. I am familiar with the ODBC layer but
never used PDO or DB.
Does anyone have any experience with these database layers?
Thanks
|
by: Nemisis |
last post by:
hi guys,
Currently converting an old classic asp system to a OOP asp.net
application. We are building the new application using a 3 tier
arcitecture and i was wondering about the following.
...
|
by: drawing in aspnet |
last post by:
Question about putting the data layer in a separate class library.
I keep reading that the data layer should be separated from the
presentation layer and put in its own class library. I am...
|
by: morleyc |
last post by:
Hi, until recently i was quite happy to add data sources from mssql
database in visual studio and drag the datasets directly onto the form
this creating a directly editable form which worked well....
|
by: Gav |
last post by:
I'm writing a windows application (using C# VS 2005 Pro) to access a MS SQL
database and although it is working fine (up to now) I'm not sure I'm going
about it in the best way. Can anybody point...
|
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: 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,...
|
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...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |