Can anyone help?
I'm trying to compact an Access database from a VB6 Program and it's not working.
I'm using info found here:
I've tried hard-coding my database path but the Compact utility
doesn't seem to be working in Access.
Here's my code:
Dim oJetEngine As JRO.JetEngine
Dim sSourceConn As String
Dim sDestConn As String
Dim lngErr As Long
Set oJetEngine = New JRO.JetEngine
On Error GoTo CompactIt_Error
oJetEngine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\CRCCore.mdb", _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\CRCCore2.mdb;Jet OLEDB:Engine Type=4"
I try to break up the source and connection strings but that doesn't work either.
I've got a Reference to the JRO object included but I can't think of anything else.
Thanks in advance.
I'm trying to compact an Access database from a VB6 Program and it's not working.
I'm using info found here:
I've tried hard-coding my database path but the Compact utility
doesn't seem to be working in Access.
Here's my code:
Dim oJetEngine As JRO.JetEngine
Dim sSourceConn As String
Dim sDestConn As String
Dim lngErr As Long
Set oJetEngine = New JRO.JetEngine
On Error GoTo CompactIt_Error
oJetEngine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\CRCCore.mdb", _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\CRCCore2.mdb;Jet OLEDB:Engine Type=4"
I try to break up the source and connection strings but that doesn't work either.
I've got a Reference to the JRO object included but I can't think of anything else.
Thanks in advance.