423,309 Members | 2,163 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,309 IT Pros & Developers. It's quick & easy.

2 db connection on 1 asp page. DB transaction

P: 1
Hi all,

Now I have problem when make a asp page.

I use 2 db connection connect to 2 db differrent

And then have some query execute on db1, some query execute on db2.

Begintrans

If true -> Commit

else -> Rollback

But this case, db1/db2 still insert records.

Thanks for all!

---------------------------------------

db1.execute

db2.execute

if use - stock <=0 then

message -> out of stock

history.back()

response.end

end if

if err.count <> 0

db1.commitTrans

db2.commitTrans

else

db1.RollbackTrans

db2.RollbackTrans

enf if
Jun 22 '18 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.