On 2014/07/03 15:12, Micka wrote:
It's really weird that :

SELECT * FROM names where name LIKE '%mic%'

works with the sqlite3 command shell but not with the C librairie ......


Really?

So if you simply make the string  testSQL = "SELECT * FROM names WHERE name LIKE 
'%mic%';"
and pass it to your SQSLite C interface, then it returns (or not) different results to the same db being connected in the same way via the sqlite3.exe???

If that is the case then you are using the worst C library in history and should change it immediately - but I think the C library is fine and you are missing something obvious. It's hard to guess what since your descriptions are frustratingly scant - maybe post the actual complete C code for at least the full function where the error happens?

Also, check that you are referring the exact same DB file, what do other queries return when you add stuff via the command line function and then refer them in the C version? Sometimes Windows will make your app refer to a file that it duplicated to another place (via the UAC) when it is in a protected folder (such as "Program Files") and do not have a trustable manifest.

There are sometimes slight differences in how C libraries handle certain eventualities viz. the command-line interface, but SQL is a form of Algebra really and the truth of the returned answer can never be compromised.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to