Re: connection problem
| От | Volkan YAZICI | 
|---|---|
| Тема | Re: connection problem | 
| Дата | |
| Msg-id | 20060801060252.GA1323@alamut.tdm.local обсуждение исходный текст  | 
		
| Ответ на | connection problem ("Tuğberk Kara" <tugberkkara@gmail.com>) | 
| Список | 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.
		
	В списке pgsql-interfaces по дате отправления: