I use this method to make connect with MSACCESS (MDB):
1) create file with any name, for exsample datasource.dsn
This data of file:
[ODBC]
DRIVER=Microsoft Access Driver (*.mdb)
UID=
UserCommitSync=Yes
Threads=3
SafeTransactions=0
ReadOnly=1
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=MS Access
Exclusive=0
DriverId=281
DefaultDir=//Here must be the dir with mdb file
DBQ=//Here full path to mdb file
2)After Add one TADOConnection and set
ADOConnection1->ConnectionString="FILE NAME=/*path to file*/DataSource.dsn";
ADOConnection1->Open();
3)Add TAdoDataSet and set: AdoDataSet1->Connection=AdoConnection1;
4) Use AdoDataSet1->CommandText for write SQL
5) AdoDataSet1->Open or AdoDataSet1->Active=1 to Open
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.