atomic transaction

C

c676228

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
 
S

Steven Cheng[MSFT]

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.
 
S

Steven Cheng[MSFT]

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.
 
C

c676228

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.
 
B

Bob Barrows [MVP]

c676228 said:
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.
 
S

Steven Cheng[MSFT]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top