Clay, Bruce wrote:
I can not connect to a posgresql/postgis database using GDAL. I have verified that the PostgreSql drivers are in the DLL by calling ogrinfo –formats.

PostgreSql is on the list

From c++ code I try the following:

strcat(connectBuf, "PG:\"dbname='postgis' host='<ip address' port='5432' user='postgres' password='<pwd>'\"");

Bruce,

You should not be including the extra escaped double quotes in the connection
string.  You likely saw an example in this form intended for use at the
commandline where the quotes would be interpreted by the shell, and keep the
whole connection string together as one argument.  Try:


strcat(connectBuf, "PG:dbname='postgis' host='<ip address' port='5432' user='postgres' password='<pwd>'");

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [email protected]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to