Forum > Databases

Read MDB in Linux

(1/2) > >>

SymbolicFrank:
Is there an up-to-date description on how to read an .MDB database in Linux (Ubuntu 22)?

I found and installed odbc-mdbtools and unixodbc. According to odbcinst I have the following driver installed:


--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---$ cat /etc/odbcinst.ini[MDBTools]Description=MDBTools DriverDriver=libmdbodbc.soSetup=libmdbodbc.soFileUsage=1UsageCount=1
But I don't understand how to configure a TODBCConnection with that.

Zvoni:
Aircode

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---MyODBCConnection.Driver:='MDBTools Driver';//Set Transaction etc.MyODBCConnection.Open; 

SymbolicFrank:

--- Quote from: Zvoni on March 15, 2023, 03:37:37 pm ---Aircode

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---MyODBCConnection.Driver:='MDBTools Driver';//Set Transaction etc.MyODBCConnection.Open; 
--- End quote ---

I tried that (filled in the properties in the Object inspector):


--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Could not connect with connection string "DSN=/var/lib/postgresql/data/Bucket/DB.MDB;DRIVER=MDBTools Driver;". ODBC error details: LastReturnCode: SQL_ERROR; Record 1: SqlState: IM012; NativeError: 0; Message: [unixODBC][Driver Manager]DRIVER keyword syntax error; 
But the syntax of those connection strings isn't very strict, it sems.

Zvoni:
The DSN points to Postgres??????

What about constructing your own connection-string, and not use something built in the background from those properties?

There is something wrong.
I‘d expect curly brackets around the driver name in the connection string

SymbolicFrank:
That location is just a shared volume.

Yes, it does look strange, but it is what FPC makes of it. I'll experiment.

Navigation

[0] Message Index

[#] Next page

Go to full version