Thread: data inserting in embedded C/libpq

data inserting in embedded C/libpq

From
"planx plnetx"
Date:
How I can insert data in Postgres with embedded sql?
May I can build a string like

char *query;
sprintf
(query,"INSERT INTO %s (%s) (%s) VALUES (%s)",table,field,value);

and process with PQexec(conn, query)?
my doubts is that PQexec is for queries and it must return a string...

how I can do in other ways?
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com