VB4 with Access: How do I lock the file to compact it via Dbengine.

VB4 with Access: How do I lock the file to compact it via Dbengine.

Post by Adams-Blake Pu » Sun, 11 May 1997 04:00:00



I have a large access .mdb as a back-end to a VB4.0 application under Novell. I
want to be able to compact the database via the DbEngine compact method. Is
there some way I can lock the .mdb so no one can get to it while the maint. is
being performed?

If you can e-mail me a note (and post) I'd appreciate it as it takes a while for
my ISP to update the VB groups.

Thanks,

Paul Raymond

 
 
 

VB4 with Access: How do I lock the file to compact it via Dbengine.

Post by Client Excele » Mon, 12 May 1997 04:00:00


Open the datbase as exclusive.

Set Db.opendatabase("xxx.mdb",1)

that should do it.  You might want to see some of the other options that
are available to you as well.

PS:> When compacting a database, other users won't be able to access it any
way.  

Quote:>I have a large access .mdb as a back-end to a VB4.0 application under
Novell. I
>want to be able to compact the database via the DbEngine compact method.
Is
>there some way I can lock the .mdb so no one can get to it while the
maint. is
>being performed?

>If you can e-mail me a note (and post) I'd appreciate it as it takes a
while for
>my ISP to update the VB groups.

>Thanks,

>Paul Raymond