|
-
Aug 28th, 2000, 08:45 AM
#1
Using VB6 and Access 2000
When you want to compact a database and your using ADO,
do you still use:-
DBEngine.CompactDatabase "olddb", "newDB"
In the VB docs it only ever references DAO when you
look up CompactDatabase
Is there another way?
Thanks,
SeanR
-
Aug 28th, 2000, 09:35 PM
#2
Guru
compact a database using ADO
Code:
'uses ADO 2.x and Microsoft Jet and Replication Objects 2.x
'declare variables
Dim objJRO As JRO.JetEngine
Dim strConnSource As String
Dim strConnDestination As String
'set connection string info
strConnSource = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Nwind2k.mdb"
strConnDestination = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\NewDb.mdb"
'instantiate object
Set objJRO = New JRO.JetEngine
'compact database from source to destination
objJRO.CompactDatabase strConnSource, strConnDestination
'release objects
Set objJRO = Nothing
-
Aug 29th, 2000, 03:44 AM
#3
Thanks for your help ClientP
-
Aug 29th, 2000, 10:25 AM
#4
Guru
ClientP?
Close enough....
-
Aug 30th, 2000, 03:56 AM
#5
Sorry abount that ClunietP.
It should teach me to look more closely and not
just scan.
SeanR
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|