Using JRO.CompactDatabase gives error. 
Author Message
 Using JRO.CompactDatabase gives error.

Hi all,

I'm trying to write a VBScript that will run in windows Scripting Host to
compact a database using the JRO.CompactDatabase method.

Here's what i get when i used the following code.

Dim je
Set je = CreateObject("JRO.JetEngine")

je.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Path\DB\DB.mdb;" & _
"Jet OLEDB:System Database=C:\Path\DB\DB.mdw;User Id=USER;Password=PASS", _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Path\DB\DB2.mdb"

Windows Script Host
Script: C:\Documents and Settings\USER\Desktop\testcompact.vbs
Line: 4
Char: 1
Error: You do not have the necessary permissions to use the '' object.  Have
your system administrator or the person who created this object establish
the appropriate permissions for you.
Code: 80004005
Source:  Microsoft JET Database Engine

Did i do something wrong?  Keep in mind i am using a different system
database and this app requires a userid and password.



Fri, 23 May 2003 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. using JRO compactdatabase method to repair corrupt access 2000 database

2. Compacting a database using JRO's CompactDatabase Method

3. DB permissions to use JRO.CompactDatabase

4. How to use JRO.CompactDatabase function?

5. CompactDatabase Method of JRO

6. JRO + CompactDatabase+ ISAM

7. JRO CompactDatabase 97 to 2000 problem...

8. CompactDatabase with JRO and workgroup administrator file

9. JRO CompactDatabase method

10. Error when compacting Access Database using JRO

11. Error During Compact Database using JRO.JetEngine

12. Help: Error 3041 when using CompactDatabase function


Powered by phpBB® Forum Software