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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle Rollback Segment and ADO connection

Status
Not open for further replies.

Tranman

Programmer
Sep 25, 2001
695
US
Hi all,
I have a big Oracle 7.3 database that I need to manipulate with VB. What I am wondering is, if I have an ADO connection object, how do I use it to set the rollback segment, then process a sql statement as a transaction. Something like:

cn.execute "Set transaction use rollback segment MONSTER;"
then
cn.execute "Delete from TABX where TRANCODE like '1234%';"

These are the same commands I would use with SQL PLUS, but the rollback segment part errors every time. Spelling and all that is OK. I have been wondering if I need a local cursor, but I have been messing with this thing for ages, and frankly just need some good advice.

Thanks in advance for any help.

Paul
 
Dim withEvents conn as ADODB.Connection

conn.BeginTrans
----your sql code
conn.CommitTrans


Error:
conn.RollbackTrans

Then u can write the code for the Connection object events also.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top