[Lazarus] odbc driver

Werner Pamler werner.pamler at freenet.de
Tue Feb 7 00:15:11 CET 2023


Am 06.02.2023 um 14:27 schrieb Larry Dalton via lazarus:
> procedure TForm1.Button1Click(Sender: TObject);
> begin
>  ODBCConnection1.Driver:='Microsoft Access Driver (*.mdb,*.accdb)';
>  ODBCCOnnection1.params.add('DBQ='+ExtractFilePath(Application.ExeName)+'MyAccess.accdb');
>  ODBCConnection1.Connected:=TRUE;
>  ODBCConnection1.KeepConnection:=TRUE;
>
> Current MS Access Driver
> Microsoft Access Driver (*.mdb,*,accdb) Version 16:00 15928020006
I have the same code in one of my test projects, and it is working. A 
problem could be that you seem to use the 64-bit IDE, but your database 
could be 32bit: My Access version (2016) only produces 32-bit databases. 
I get the same error message when I try to open a 32-bit accdb file in 
the 64-bit application.



More information about the lazarus mailing list