Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Access 97 to Access2000 using VB

Status
Not open for further replies.

swaykid

IS-IT--Management
Oct 16, 2003
13
0
0
ES
Does anyone know of a way to convert access97 mdb files to Access2000 WITHOUT using access, for example using MDAC in VB6. The problem is I need to do a bulk conversion of the MDB files we used for an old VB/Access project to Access2000 format and the client does not have Access 2000 installed.

Thanks alot

Adam
 
I found this:

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

This does exactly what is needed! :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top