Const JET_ENGINETYPE_DBASE3 = &H10
Const JET_ENGINETYPE_DBASE4 = &H11
Const JET_ENGINETYPE_DBASE5 = &H12
Const cstrDatabase As String = "C:\DBase-DB"
Const cstrUsername As String = ""
Const cstrPassword As String = ""
Dim DB As ADODB.Connection
Set DB = New ADODB.Connection
With DB
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("User ID").Value = cstrUsername
.Properties("Password").Value = cstrPassword
.Properties("Data Source").Value = cstrDatabase
.Properties("Jet OLEDB:Engine Type").Value = JET_ENGINETYPE_DBASE4
.Open
Debug.Print .ConnectionString
.Close
End With
Set DB = NothingListing 1: DBase-Datenbank mit ADO öffnen Die Eigenschaft .Properties("Jet OLEDB:Engine Type").Value muß an die eigene Datenbank angepaßt werden. Data Source ist das Verzeichnis, in dem die Tabellen liegen. |