From: | Stanley Wang <stan_w99(at)yahoo(dot)com> |
---|---|
To: | pgsql-odbc(at)postgresql(dot)org |
Subject: | C application to PostgreSQL in Windows |
Date: | 2006-08-24 15:56:43 |
Message-ID: | 20060824155644.50369.qmail@web51009.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Hi,
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.
PGconn *conn;
conn = PQconnectdb("user=postgres password=stan
dbname=postgis hostaddr=127.0.0.1 port=5432");
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
http://mail.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | noreply | 2006-08-24 19:16:09 | [ psqlodbc-Bugs-1000417 ] odbc_lib_connect() returns "Specified driver could not be loaded due to system error 182 (PostgreSQL ANSI)" |
Previous Message | noreply | 2006-08-24 15:25:39 | [ psqlodbc-Bugs-1000709 ] SQLForeignKeys missing FK_NAME missing PK_NAME |