VB4 - Commit or Rollback without BeginTrans. (Error 3034) 
Author Message
 VB4 - Commit or Rollback without BeginTrans. (Error 3034)


VB4, Win 95 - posted to:
comp.lang.basic.visual.database and comp.lang.basic.visual.misc

I am converting a VB3 app to VB4. Everything is going fine except for
a form that has BeginTrans, Commit and Rollback statements within the

The code worked 100% under VB3 however I am experiencing problems with
code that generates the "Commit or Rollback without BeginTrans" error

Basically, the only modification to the relevant code  that I have
made is to include the following:

Dim MyWorkspace As Workspace - in the General section
Set MyWorkspace = Workspaces(0) - in the form load section

I modified the existing Commit, Rollback and BeginTrans statements to:
MyWorkspace.BeginTrans, MyWorkspace.Commit and MyWorkspace.Rollback.

The form is arranged for three inputs via text boxes that add, modify
or delete data from within an Access database table. There is a data
control on the form.

Also on the form are command buttons for accepting, deleting,
modifying, cancelling changes, and exiting.

Even if I just load the form then immediately exit, I get the "Commit
or Rollback without BeginTrans" error message. That is, it loads the
form, reads (amongst other statements) the following; Dim MyWorkspace
As Workspace , Set MyWorkspace = Workspaces(0) and
When the exit button is pressed it then reads (amongst other
statements);  MyWorkspace.Commit, it is then that error 3034 is

I have been stuffing around with this for a few days now, read
anything I could on the subject but I am unable to get it right.

Sorry for being so long winded with the posting but I would appreciate
some help and guidance on this subject


Sat, 26 Jan 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. VB4 - Commit or Rollback without BeginTrans. (Error 3034)

2. Commit or Rollback without BeginTrans Error

3. dbgrid() problem w.r.t begintrans, committrans, runtime error 3034

4. BeginTrans Commit RollBack

5. BeginTrans, Commit, RollBack

6. BeginTrans|Commit|Rollback

7. Begintrans/Commit/Rollback

8. VB3 err:Commit or RollBack without BeginTrans, but the BeginTrans is there!

9. "CommitTrans (or Rollback) without BeginTrans"

10. Error -3034 error 3000

11. Nested BeginTrans/Rollback stmt error - need help

12. Commit and Rollback error


Powered by phpBB® Forum Software