Re: connection problem

From: Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr>
To: Tuğberk Kara <tugberkkara(at)gmail(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: connection problem
Date: 2006-08-01 06:02:52
Message-ID: 20060801060252.GA1323@alamut.tdm.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Jul 31 10:18, Tuğberk Kara wrote:
> PGconn *conn=NULL;
> char *conn_str="hostaddr=172.16.11.2 port=5432 dbname=postgres
> user=postgres password=654321 reqiressl=0";
> conn=PGconnectStart(conn_str);
> if(PGstatus(conn)=CONNECTION_BAD){
>
> PGerrorMessage(conn);
> }
> else{
>
> printf("connected");
>
> }

You're using totally wrong functions. There's even doesn't exist a
function called PGconnectStart().

First of all, I'd suggest you to either reading libpq manual[1] in the
PostgreSQL documentation or "PostgreSQL ile Programlama"[2] (in Turkish)
book's C API related section.

[1] www.postgresql.org/docs/current/interactive/libpq.html
[2] http://www.students.itu.edu.tr/~yazicivo/doc/postgresql-ile-programlama-20060214.pdf

Regards.

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Joachim Wieland 2006-08-01 07:39:48 Re: Using FETCH ALL with descriptor areas
Previous Message Andy Shellam 2006-07-31 16:16:11 Re: connection problem