BeginTrans With VB 4 And Access Database 
Author Message
 BeginTrans With VB 4 And Access Database

Quote:

> I have an access database that I am accessing with a VB4 app.

> I set the workspace in the initial form load of the main form.

> I show form 2 and in the form_load, I issue WS.BEGINTRANS.  After updating
> data, I click command button and do WS.COMMIT.

> The commit fails with message "commit or rollback without begin trans"

> Does anyone know what would cause this ??

> THanks in advance,

> Barry Alkis

Barry -

If your workspace variable is declared in Form_load this could be the
problem.  I think you are setting your ws variable, opening a
transaction, and then when form_load finishes, and then the ws variable
is going out of scope.  In this case the pending transaction is
automatically rolled back by Access.  Then when you try to commit, you
get the error message.  That's the best I can do without seeing your
code.

HTH,

John



Tue, 05 Sep 2000 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. To BeginTrans or not to BeginTrans........

2. linking one access database to another access database through vb.net code

3. VB with BeginTrans using native ODBCAPI calls to SQL Server 6.0

4. VB 3.0 + Acc2.0 + ODBC2.0 + BeginTrans

5. Importing an Access 2000 table into another Access 2000 database with VB Code

6. I need help with SQL in a VB program to access an Access database

7. accessing MS access database using VB&CGI

8. ACCESS BeginTrans/CommitTrans

9. VB 4.0 (32-bit) accessing password protected Access 7.0 database

10. ACCESS CommitTrans/BeginTrans

11. Accessing a secure ACCESS database with VB

12. BeginTrans() with MS Access 7.0 ODBC driver


 
Powered by phpBB® Forum Software