C application to PostgreSQL in Windows
am 24.08.2006 17:56:43 von Stanley WangHi,=20
I am a newbie to PostgreSQL. I want to write a C
application to retrieve data from PostgreSQL. I have
installed the PostgreSQL v8.1 for Windows and write a
simple test application. I also downloaded and
installed the ODBC driver. The application compiles
OK, but when I run it, it crashes. The problematic
code is to connect to the database.=20
PGconn *conn;
conn =3D PQconnectdb("user=3Dpostgres password=3Dstan
dbname=3Dpostgis hostaddr=3D127.0.0.1 port=3D5432"); =20
=20
The DSN I created is like following:
Data Source : PostgreSQL Unicode
Database : postgis
Server : 127.0.0.1
Username : postgres
Password : stan
Port : 5432
I wonder whether it is the correct way to set up
everything. Thanks in advance for your answer.
Stan
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=20
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend