Compact Access Database from VB6? 
Author Message
 Compact Access Database from VB6?
Is there any way to perform the same compacting in VB6 code (NOT vba) that
you can do in Access with the Utilities menu option (Compact and Repair)??
Need to do this periodically on a big file (50Meg) to keep access time
reasonable, and don't want to force the client to buy Access...

Thanks!
Jack



Thu, 19 May 2005 08:43:06 GMT
 Compact Access Database from VB6?

Right. Check out JRO (Jet Replication Objects) which can compress/repair Jet
databases.
See www.microsoft.com/data for leads.

--
William (Bill) Vaughn, Author, Trainer, Mentor
Microsoft Pacwest Regional Director, MVP
"ADO and ADO.NET Examples and Best Practices for VB Programmers--2nd
Edition" (ISBN: 1-893115-68-2)
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
________________________________


Quote:
> Is there any way to perform the same compacting in VB6 code (NOT vba) that
> you can do in Access with the Utilities menu option (Compact and Repair)??
> Need to do this periodically on a big file (50Meg) to keep access time
> reasonable, and don't want to force the client to buy Access...

> Thanks!
> Jack



Thu, 19 May 2005 08:45:09 GMT
 Compact Access Database from VB6?
Jack

This code does it

To compact a database use :-

CompactDatabase strDB, strTempDBPath
Kill strDB
Name strTempDBPath As strDB

To Repair a database use :-

RepairDatabase strDBase

The variable strDB and strTempDB hold the database path and names.  
The compactDatabase line may need additional parameters for the user
and/or password if your database has that level of user access
control.

Hope this helps

Duncan

Quote:

> Is there any way to perform the same compacting in VB6 code (NOT vba) that
> you can do in Access with the Utilities menu option (Compact and Repair)??
> Need to do this periodically on a big file (50Meg) to keep access time
> reasonable, and don't want to force the client to buy Access...

> Thanks!
> Jack



Thu, 19 May 2005 21:53:36 GMT
 Compact Access Database from VB6?
You can use this code:

http://www.veign.com/information/application/database/codedb001.html

--
Veign
www.veign.com
<<NEW Link200 v2.0.2 Released>> - Bigger, Better, Cleaner!
www.veign.com/download_application.html#Link200
Code Samples & Sample Projects
http://www.veign.com/information/application/info_app.html
NEW! - Quick Reference Guides
http://www.veign.com/company_store.html
------

Quote:
> Is there any way to perform the same compacting in VB6 code (NOT vba) that
> you can do in Access with the Utilities menu option (Compact and Repair)??
> Need to do this periodically on a big file (50Meg) to keep access time
> reasonable, and don't want to force the client to buy Access...

> Thanks!
> Jack



Thu, 19 May 2005 23:21:52 GMT
 Compact Access Database from VB6?
Jack,

Here is an example how to do that

http://support.microsoft.com/default.aspx?scid=kb;en-us;230501

--
Val Mazur
Microsoft MVP


Quote:
> Is there any way to perform the same compacting in VB6 code (NOT vba) that
> you can do in Access with the Utilities menu option (Compact and Repair)??
> Need to do this periodically on a big file (50Meg) to keep access time
> reasonable, and don't want to force the client to buy Access...

> Thanks!
> Jack



Fri, 20 May 2005 01:44:46 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. Compacting Access 2000 database in a VB6 program

2. Compact an MS Access 97 Database File Through VB6

3. Compact Access 2000 DB with VB6 Code

4. Compact Access DB using ADO & VB6

5. VB6, Access, ADO, and Compacting

6. compacting an access 2000 with vb6

7. Compact Data Access under VB6

8. Compact Database From VB6

9. Repairing/compacting a Access-Database without Access or DAO

10. Compacting access database

11. Compact an Access Database

12. MS Access databases compacting by schedule!!!


 
Powered by phpBB® Forum Software