atomic transaction
am 26.04.2007 02:18:02 von bettys
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
Re: atomic transaction
am 26.04.2007 05:33:40 von Jon Paal
it's either with stored procedure or part of ADO
http://www.sqlteam.com/item.asp?ItemID=15583
http://msdn2.microsoft.com/en-us/library/aa905921(sql.80).as px
"c676228" wrote in message news:BBC0C7AE-ACE7-4CCA-B69A-17E216949A06@microsoft.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
Re: atomic transaction
am 26.04.2007 09:46:55 von stcheng
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.
Re: atomic transaction
am 01.05.2007 04:49:44 von stcheng
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.
Re: atomic transaction
am 09.06.2007 01:02:01 von bettys
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.
>
>
Re: atomic transaction
am 09.06.2007 13:27:40 von reb01501
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"
Re: atomic transaction
am 13.06.2007 04:21:46 von stcheng
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.