[GRASS-user] Re: v.db.select works, db.select fails: same VAR

Hello Markus,

I just tried ogrinfo –-formats and ODBC is not in the list :open_mouth:

Apparently, the guys at SuSE who made the RPM didn’t bother to compile OGR with ODBC support… I might as well build it all myself if that doesn’t mean spending all day downloading and building tonnes of dependencies.

Now, is it so that db.select relies on OGR to access the database and v.db.select doesn’t? My DB server is PostgreSQL, which is supported by my stock OGR build, and db.select does indeed work when I set driver=pg.

Thanks for your help (and insight)

Sébastien

could you try ogrinfo on that data set? Just to see if it also fails. Should be

something like

ogrinfo ODBC:user/pass@DSN table

Markus

On 19/03/08 17:57, Wailliez Sébastien wrote:

Hello Markus,

I just tried ogrinfo –-formats and ODBC is not in the list :open_mouth:

Apparently, the guys at SuSE who made the RPM didn’t bother to compile OGR with ODBC support... I might as well build it all myself if that doesn’t mean spending all day downloading and building tonnes of dependencies.

Debian's gdal doesn't have ODBC either, don't know why... It would be useful as this is the only way to access Personal GeoDB files AFAICT, and those are becoming more and more frequent.

Now, is it so that db.select relies on OGR to access the database and v.db.select doesn’t?

Check v.db.connect -p on the map. Probably it is set to something else then db.connect.

db.connect handles the default connection to be used for the mapset, v.db.connect handles the connection map by map.

My DB server is PostgreSQL, which is supported by my stock OGR build, and db.select does indeed work when I set driver=pg.

If you are using postgresql, why would you want to use ODBC ?

Moritz