On 4/7/2015 9:11 PM, Kumar Suraj wrote: > You can add this to top of the code.. > > char command[512]; > snprintf(command, 512, SELECT_DN);
I don't see anything wrong in the code you've shown. The problem must lie in the code you haven't. My guess would be, the query you are preparing is not the query you think you are preparing. Print "command" and strlen(command) right before sqlite3_prepare_v2 call, to double-check. -- Igor Tandetnik