[FWTools] Connecting to PostgreSQL with fwtools
Flavio Perri - QMap srl
flavio.perri at qmap.it
Tue Jul 7 04:52:13 EST 2009
I used FWTools in my program to manipulate shapefiles and it worked fine.
Now I'd like to use a DB(Postgres/PostGis) to read and write GIS data
i'm developing with the last release (2.4.2) and unfortunately I cannot find
a right solution to connect to PGSQL.
First, I got the driver "PostgreSQL", then I tried to connect to the
DBserver using the function CreateDataSource().
dataSource = poDriver->CreateDataSource("layerName",(char**)options );
I always get a NULL dataSource, and I'm stuck.
I'm sure that OGR is capable to connect to PGSQL, because I tried the tool
"ogr2ogr" and it connects to PG and manipulate GIS data with a simple
connection string like: PG:"dbname='databasename' host='addr' port='5432'
Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FWTools