Database type Specifier Example
dBASE III dBASE III; drive:\path
dBASE IV dBASE IV; drive:\path
dBASE 5 dBASE 5.0; drive:\path
FoxPro 2.0 FoxPro 2.0; drive:\path
FoxPro 2.5 FoxPro 2.5; drive:\path
FoxPro 2.6 FoxPro 2.6; drive:\path
Function TryConnect(DbType As String, MyFile As String) as Boolean
On Error GoTo Err_h
Dim Db as DAO.Database: Set Db = CurrentDb
Dim strConnect As String, td as DAO.TableDef
strConnect = DbType & ";HDR=NO;IMEX=2;DATABASE=C:\Мои документы\Privat\2;TABLE=" + MyFile1 + ".dbf"
Set td = Db.CreateTableDef(MyFile1)
td.Connect = strConnect
td.SourceTableName = MyFile1
Db.TableDefs.Append td
Db.TableDefs.Refresh
TryConnect = True
Err_h:
Exit Function
Вопрос по Dao
Кто подскажет как с помощю DAO можно подключится к базе *.dbf, если можно то с примером. Спасибо.