VB4 Jet Engine Runtime Error 3196 
Author Message
 VB4 Jet Engine Runtime Error 3196

I am using VB4 Professional 16 bit on Windows 3.1. I am new to the Jet
Engine relational database system. Taking one step at a time I am
writing a small book library system similar to biblio.mdb that comes
with VB4.

I have the following menu options :-
        Create New Database
        Open Existing Database
        Close Database
        Repair Database

I can create a database named by a user, open a daatabase and close the
database and they seem to work. However, when I run RepairDatabase I get

        Runtime error 3196
        Couldn't use 'C:\TempDB\ABC.MDB'; database already in use.

I purchased Sheridan Data Widgets v2.0 and am using the VB data control
in conjunction with the Sheridan enhanced data control on my form.

I am sure it is something very simple that I am missing. It seems as
though the database I created or opened is not closing properly and is
still in memory and in use after I have clicked menFileClose menu

My work is therapeutic as I am slowly recovering from a muscle disease
and therefore I am at home nearly all of the time. So I have no one to
seek advice from. I have worked through VB 4 Prof manuals and purchased
several expensive books on database programming but to no avail.

I have spent many days and combinations of lines of code trying to
resolve my problem.

In the menFileClose_Click() I have the following :-

        Set Dyn1 = Nothing
        Set MyDb = Nothing
        frmDb.Data1.DatabaseName = ""
        frmDb.Data1.RecordSource = ""
        frmDb.SSDBData1.DataField = ""

I have tried to find a good example of creating, opening and closing a
database. Particularly where you create a new database and then leave it
in a state where you can start to add records.

I am blessed with patience but would be really glad of any guidance
anyone can be kind enough to give me.

Many thanks.

Gordon Smith

Wed, 11 Oct 2000 03:00:00 GMT  
 VB4 Jet Engine Runtime Error 3196

There are a number of general guidelines for VB apps - I am using a vb4 16
bit client/server environment and can get 3196/7.

Because Jet is not multithreaded/file server you will get problems like
this. try to use DBEngine.Idle dbFreeLocks thru your app to let Jet catchup.
also try to use transaction processing when performing adds and updates
(look at BeginTrans and CommitTrans in vb help).

To be honest there are a few articles on the ms support site which will


Fri, 13 Oct 2000 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Help!! Runtime Error 3196 When Using Jet Engine Database

2. Help! DAO Error 3196 when compacting database

3. Help! DAO Error 3196 when compacting database

4. compactdatabase error 3196

5. Error 3196 compacting database

6. Error 3196 - How do I close this database?

7. CompactDatabase Method Error 3196

8. Closing a Database: Error 3196

9. Case sensitive selection using VB4 Jet Engine

10. jet engine engine.idle

11. err.number 3196

12. Jet engine displays error messages in Spanish-Help!


Powered by phpBB® Forum Software