vb6 compact access database under vista

Hello

This VB6 code is used under windows XP but doesn't function under Vista :

Dim JRO As JRO.JetEngine
Set JRO = New JRO.JetEngine

NomBaseOrigine = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Base1.mdb;Jet OLEDB:Database Password=password"
NomBaseDestination = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Base2.mdb;Jet OLEDB:Engine Type=4;Jet OLEDB:Database Password=password"
           
JRO.CompactDatabase NomBaseOrigine, NomBaseDestination
fs.deletefile "C:\Base1.mdb", True
Name  "C:\Base2.mdb" As  "C:\Base1.mdb"

Is it possible to have a VB6 code to compact an access 97 database ?

Thanks in advance
lugos01Asked:
Who is Participating?
 
Glenn_MooreCommented:
What I would do is use Tools, Macros, Record a new Macro, and step through the process.  The code generated should work.  
0
 
lugos01Author Commented:
Thanks for your answer.

Does it function if Ms Access is not installed on the computer ?

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.