Good afernoon everyone
I am developping an interface C++ for a DB PostgreSQL.
I am using the 'libpq++ ' library to load and save in the base.
Here is my problem :
to save some data in the base, we have to build a string (here : query)
for these functions :
Exec(char *query) or ExecTuplesOk(char* query)
Then, if I want to save an integer in my DB, i have to do this :
sprintf(query,"INSERT INTO myTable VALUES(...,%d,...)",myInt);
myObject.ExecTupleOk(query);
With integer, it is not so bad, but with float or double, the fact to
convert data to string is very bad for precision.
Could someone tell me how to avoid using a string to save in the DB
Thank you all
regards, Renaud THONNART