Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
filf
Yak Posting Veteran
67 Posts |
Posted - 2001-06-20 : 06:57:32
|
| I have a problem whereby I am trying to wrap an update in a transaction, but my onTransactionCommit and onTransactionAbort events are not firing, even though the transaction is working.I have the following statement at the top of my page:@TRANSACTION = supportedbecause objConn is a universal dsn db connection used by all pages in the site, and in many instances it is called by different pages in the same frameset. Is this my problem. If I change this statement to REQUIRED or REQUIRED_NEW which is what I think I possibly need I am getting unspecified errors in pages lower down the frameset when they try to make a second call to the same db connection.Here are updates wrapped in a trans:objConn.BeginTranssqlString = sqlStatement 1 objCmd.CommandText = sqlStringobjCmd.CommandType = adCmdTextSet objCmd.ActiveConnection = objConnobjCmd.Execute sqlString = sqlStatement 2 objCmd.CommandText = sqlStringobjCmd.CommandType = adCmdTextSet objCmd.ActiveConnection = objConnobjCmd.ExecuteobjConn.CommitTransMy events are as follows:SUB objConn_OnTransactionCommit() Response.write("Operation was successful")end subSUB objConn_OnTransactionAbort() objConn.RollbackTrans Response.write("An error has occurred please Press F5 and then Try again.")end subI am a bit of a newbie to this. I also cannot register any vb compenents on the host server so I am limited to only what I can do from an asp page. I am sure the clue is in the transaction statement I am placing in the top of the page, any ideas which improve how I am doing this would be greatly appreciated. |
|
|
|
|
|