Hello
I would like to insert values into a table from a C or C++ application.
The only way that I know how to do this is some variation of:
...
PgDatabase my_db("dbname=my_database");
...
char text[256];
sprintf(text,"INSERT INTO my_table VALUES (1,2,3,4,5);");
int err=my_db.ExecCommandOk(text);
...
This seems sort of clumsy to me - especially if the table has many
columns. Is there a better way of doing this?
Thank you very much.
Brian
--
Brian Kurt Fujikawa
Weak Interactions Group
Institute for Nuclear and Particle Astrophysics
Lawrence Berkeley National Laboratory
1 Cyclotron Road, MS 50-208
Berkeley, CA 94720, USA
http://bkf0.lbl.gov/fujikawa/
mailto:bkfujikawa@lbl.gov
tel: +1-510-486-4398
fax: +1-510-486-6738