Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Transactions from ASP

Status
Not open for further replies.

bgreenhouse

Technical User
Feb 20, 2000
231
0
0
CA
Hi Folks

I've read a bit about MTS - but I'm not sure it applies to what I want to do. I simply want to be able to commit, begin and rollback SQL transactions (on an access database) from an ASP page. So I've tried what seems obvious - passing it as I would any other SQL statement...

Code:
dbObj.execute "BEGIN TRANSACTION"

and

Code:
dbObj.execute "END TRANSACTION"

but it doesn't like that, giving me

Code:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14' 

[Microsoft][ODBC Microsoft Access Driver] Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.

Any suggestions? Anything obvious?

Thanks,

Ben
 
For anyone searching for the answer, I've found it...Use your connection object (dbObj in this example), and use the following commands:

Code:
dbObj.BeginTrans
dbobj.RollbackTrans
dbobj.CommitTrans

It's pretty easy...

B
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top