Hello All,
Recently, I have installed sqlite3 and trying to get a very simple
database application working with it. My application is in C++. I am
trying to use sqllite3_exec and sqlite3_get_table etc to insert records
into my database. I have already created a table and database pointer is
already pointing to the opened database. Now I have following query to
execute:
my query string is:
insert into sdb
(id,resclass,type,manufacturer,method,ownership,precision,minrange,maxrange,capacity)
values (43,'HARDWARE','MONITOR','GE','NA','XYZ',0,0,4,2)
Same string on commandline works just fine. I think it might be related to
string variables and escape charasters. So I tried using the following:
sqlite3_exec(db,query, NULL, 0, &zErrMsg);
I was getting unrecognized token: ""
I also tried doing this: this
char* tpquery;
tpquery = sqlite3_mprintf("%q",query);
Now I get SQL error near "HARDWARE": syntax error
Can someone please give me some hint.
Regards,
--Sameer.