[unixODBC-support] ODBC connection to Access DB
nick.gorham at easysoft.com
Fri Nov 18 15:06:05 GMT 2005
M S wrote:
> Hi all,
> i tried the mdbtools-dev list but got no reply.
> I'm trying to extract data from an Access Database. The specific
> application is to extract shapes from an .mdb file for GIS. the GDAL
> open source guys wrote something for this but it only works on windows
> due to some DLLs or something. If i can get the ODBC to work on
> linux, then it should be good to go. basically, at this point i am not
> sure my ODBC connection is working. I am new to this so please excuse
> the wrong use of terminology. Is there a service that needs started
> for UNIXODBC? I ask this because of the port in the DSN.
> I have installed all version 0.5-1 RPMS... mdbtools, mdbtools-devel,
> I made the driver file:
> Description = MDB tools ODBC driver
> Driver = /usr/lib/libmdbodbc.so.0
> Setup =
> FileUsage = 1
> CPTimeout =
> CPReuse =
> then i did the odbcinst -i -d -f <FILENAME>
> it said successful driver installation, and i can see the driver
> listed in the /etc/odbcinst.ini file.
> Then i defined my Data Source Name in the /etc/odbc.ini file:
> Description = Microsoftt Access Database driver of GDB
> Driver = MDBtoolsODBC
> Database = /home/user/data.mdb
> Servername = localhost
> UserName =
> Password =
> port = 5432
> when i use the DataManager, it shows me the driver name i put in under
> the DRIVER tree, and it also lists the DSN under System Data Sources
> and User Data Sources. When i click on the user datasource tree and
> expand it, i get the DSN "GDB". when i click on that, i get prompted
> for password, i hit ok. then comes the error:
> when i click on the "tables" i get this error "Failed to SQLTables".
> Can anyone help? Does it sound like the ODBC connection is not
> working or established or setup right?
> thanks in advance!
It sounds like the connection is ok, but the driver call to return the
list of tables in the mdb has failed. There is no port or service, the
servername, username, password and port have no meaning for the mdb
driver AFAIK. Be aware (and I hope the MDB folk don't mind me saying
this) the MDB driver is rather "beta" at the moment. If you have a
windows machine available I can suggest a commercial solution...
More information about the unixODBC-support