简体   繁体   中英

Using ogr2ogr to convert PostGIS table to personal geodatabase

I need to convert a PostGIS table to a personal geodatabase using ogr2ogr. I can convert tables to a shapefile without a problem but whenever I try to convert it to .mdb using the ODBC driver, I get an error. I have got the 64-bit GDAL version and also the 64-bit ODBC driver installed.

This is my command:

ogr2ogr -f "ODBC" C:\users\[user]\file.mdb PG:"host=localhost user=[user] dbname=[db] password=[password]" "[tablename]"  

This is the error I get:

ODBC driver failed to create C:\users\[user]\file.mdb

Am I using the right command to do this, or am I missing a driver or something?

You can not. The ODBC is currently a read-only driver and cannot create databases.

From http://www.gdal.org/drv_odbc.html :

Currently the ODBC OGR driver is read-only, so new features, tables and datasources cannot normally be created by OGR applications. This limitation may be removed in the future.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM