|I used CppSQLite3_2.zip freeware and wrote some Windows service to manage SQLite DB.
As a simple application, it acts well.
ex. In the application for test, this code reported proper value.
const char* gszFile = "e:\\Test\\Database\\Server.db3";
int TryOpen(char * sql)
SQLite3DBCpp *db = new SQLite3DBCpp;
SQLite3QueryCpp q = db->execQuery("select * from my_settings");
But after implemented as a service, it doesn't returned any values.
ex. in the service program, I used the above code directly.
Here I tried to give SQL cmd as a parameter.
AnsiString sQuery; ...
SQLite3QueryCpp q = db->execQuery(sQuery.c_str());
If I give a static command such as "select * from my_settings" instead of sQuery.c_str(), it operated properly, but it doesn't act when it receives a dynamic params.
In fact, if we dumped the sQuery.c_str(), the output was "select * from my_settings".
What's the matter? Please tell me the reason.
I think it'll be no problem in Linux, but I don't know the Windows inside well.
Please help me, Best regards!
-- modified 2-Nov-15 10:51am.