473,398 Members | 2,088 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,398 software developers and data experts.

atomic transaction

Hi all,
In asp.net, there is an object sqltransaction we can use to garantee the
data will be written to database either completely or none will be written
into database.
I am not sure if there is a similar thing I can use in classical asp.
Can you provide some info?
Thanks
--
Betty
Apr 26 '07 #1
6 2519
it's either with stored procedure or part of ADO

http://www.sqlteam.com/item.asp?ItemID=15583

http://msdn2.microsoft.com/en-us/lib...1(sql.80).aspx
"c676228" <be****@community.nospamwrote in message news:BB**********************************@microsof t.com...
Hi all,
In asp.net, there is an object sqltransaction we can use to garantee the
data will be written to database either completely or none will be written
into database.
I am not sure if there is a similar thing I can use in classical asp.
Can you provide some info?
Thanks
--
Betty

Apr 26 '07 #2
Hi Betty,

I agree with Jon. For classic ASP, since there is no built-in component
class which provide transaction support like ASP.NET, you may have two
choices if you need to perform ACID transaction based database accessing:

1. Put all the transaction awared processing in SQL Server side , use T-SQL
begin and commit transaction. You can define store procedures to do this.

2. You can create COM+ component which support distributed transaction. And
your ASP page can call those COM+ components to leverage the transaction
functionality. However, developing COM+ components is much more complex
than vbscript page.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 26 '07 #3
Hi Betty,

Have you got any further idea on this? If there is still anything we can
help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

May 1 '07 #4
Hi Jon and Steven,
I don't really know much about developing com+ myself.
I think Stored procedure is a choice. but I am also thinking about using ADO
call too, especially when you have a table with many columns(say 30) and you
want to insert a record into this table, then you need to write a stored
procedure with many
parameters in order to pass data into this stored procedure, if this is the
case, ADO call seems to be much easier. I am not sure if I am right since I
read many artiles talking about why stored procedure is preferred than ADO
call.
--
Betty
"Steven Cheng[MSFT]" wrote:
Hi Betty,

Have you got any further idea on this? If there is still anything we can
help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 8 '07 #5
c676228 wrote:
Hi Jon and Steven,
I don't really know much about developing com+ myself.
I think Stored procedure is a choice. but I am also thinking about
using ADO call too, especially when you have a table with many
columns(say 30) and you want to insert a record into this table, then
you need to write a stored procedure with many
parameters in order to pass data into this stored procedure, if this
is the case, ADO call seems to be much easier. I am not sure if I am
right since I read many artiles talking about why stored procedure is
preferred than ADO call.
"Easy" is not a good reason to choose one technique over another, especially
if you are deciding between an insecure technique like dynamic sql (think
SQL Injection) and a secure technique like passing parameter values to a
stored procedure.

I will also argue that given the need to worry about delimiters, embedded
and otherwise, dynamic sql is much harder to do than passing parameters.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jun 9 '07 #6
Hi Betty,

If you using ADO calls, then, the transaction logic should also be
encapsulated at database engine layer rather than your application code
layer. Sure, for classic ASP, using ADO component to execute query is the
most convenient one.

BTW, so far I only saw this old issue opened from you, but haven't seen any
new threads you created, have you created any new ones?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 13 '07 #7

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

Similar topics

8
by: Glenn Kasten | last post by:
I am wondering which operations in Python are guaranteed to be atomic in the presence of multi-threading. In particular, are assignment and reading of a dictionary entry atomic? For example,...
42
by: Shayan | last post by:
Is there a boolean flag that can be set atomically without needing to wrap it in a mutex? This flag will be checked constantly by multiple threads so I don't really want to deal with the overhead...
2
by: ewu | last post by:
Hello, I am trying to implement a tree-structure data set on Microsoft Access using Joe Celko's nested sets (see http://www.intelligententerprise.com/001020/celko.shtml). According to Joe...
28
by: robert | last post by:
In very rare cases a program crashes (hard to reproduce) : * several threads work on an object tree with dict's etc. in it. Items are added, deleted, iteration over .keys() ... ). The threads are...
6
by: blackstreetcat | last post by:
consider this code : int i; //gobal var Thread1: i=some value; Thread2: if (i==2) dosomething(); else dosomethingelse();
1
by: spacehopper_man | last post by:
no "rename" operation in C# !!! - this has been covered in this group before, but I can't find any good answers. what I am trying to do is refresh the content in a file with minimum...
2
by: Freedom fighter | last post by:
Hello, Is a singleton class the same as an atomic class? I know that a singleton class can only be instantiated once, but does that concept apply to an atomic class? Thank you.
0
by: Vishwahere | last post by:
Hi I am using a query as below: BEGIN NOT ATOMIC FOR temp_row AS SELECT pr.REC_TRK_ID,cm.FINC_MTCH_KEY_ID,pr.MED_MTCH_KEY_ID FROM CARDTC.PGM_REQ pr LEFT OUTER JOIN CARDTC.CDB_MTCH cm ON...
11
by: Jon Harrop | last post by:
Can read locks on a data structure be removed safely when updates are limited to replacing a reference? In other words, is setting a reference an atomic operation? I have been assuming that all...
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
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
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
agi2029
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 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.