PQputline

From: Bruno LEVEQUE <bleveque(at)unilim(dot)fr>
To: pgsql-general(at)postgreSQL(dot)org
Subject: PQputline
Date: 1998-07-17 19:35:56
Message-ID: 35AFA79C.2641D806@unilim.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I want do something like :

<begin of a function>

char ligne[200] = "INSERT INTO compte VALUES(";

strcat(ligne,compte);
strcat(ligne,",\'");
strcat(ligne,Nom_Compte);
strcat(ligne,"\');")

< compte, Nom_Compte are *char[15] >

res = PQexec(connexion,"BEGIN");
PQclear(res);

res = PQexec(connexion,"COPY compte FROM stdin");
PQclear(res);

PQputline(connexion,ligne);
PQputline(connexion,"\\.\n");

res = PQendcopy(connexion);
PQclear(res);

res = PQexec(connexion,"END");
PQclear(res);

< end of function >

Question : What it's false ?

Any help accept.

Thank's

--
+++++++++++++
Bruno LEVEQUE
CNAM
+++++++++++++

Browse pgsql-general by date

  From Date Subject
Next Message Maarten Boekhold 1998-07-17 20:14:08 Re: [GENERAL] concatenation of string literals
Previous Message Rostislav Matl 1998-07-17 19:28:23 Re: [GENERAL] listing all tables