Page 1 of 1
Como usar CompacDataBase no ADO?
Posted: Tue Dec 13, 2005 6:53 pm
by ronaldo
Preciso utilizar a opção de compactar base de dados do access...
Posted: Wed Dec 14, 2005 7:24 pm
by YamilBracho
Usa JRO (Jet and Replication Objects): The Vb code follows :
Dim oJro As JRO.JetEngine
Dim cnn1 As String, cnn2 As String
' Creamos un nuevo objeto JetEngine
Set oJro = New JRO.JetEngine
' Cadena de conexión de origen
cnn1 = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data source=c:\Mis documentos\base97.mdb;" & _
"Jet OLEDB:Engine Type = 4;" & _
"Jet OLEDB:Database Password = Contraseña"
' Cadena de conexión de destino
cnn2 = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data source=c:\Mis documentos\base2000.mdb;" & _
"Jet OLEDB:Engine Type = 5;" & _
"Jet OLEDB:Database Password = Contraseña"
' Compactamos la base de datos
oJro.CompactDatabase cnn1, cnn2
Posted: Wed Dec 14, 2005 11:16 pm
by ronaldo
em visual basic em consegui. não consigo fazer no xharbour
Posted: Thu Dec 15, 2005 1:11 am
by YamilBracho
JRO stands for Microsoft Jet and Replication Objects 2.6 Library
Any error messages you want to share with us ?