[gdal-dev] can not connect top postgis db using GDAL

Clay, Bruce bclay at ball.com
Thu Sep 23 16:23:04 EDT 2010


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>'\"");

*dataSource = OGRSFDriverRegistrar::Open(connectBuf, FALSE)

 

*dataDouce always comes back NULL

 

 

I tried ogrinfo -ro PG:host=<ip address> user=postgis password=<pwd>
dbname=postgis based on rhw online examples and I get an error message
indicating no password was supplied.

 

I can connect to the remote host usin pgAdminIII so I know the systems
can talk to each other.

 

Does anyone see what I might be doing wrong?  

 

 

Bruce

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100923/3bf6816d/attachment.html


More information about the gdal-dev mailing list