sandhya <[EMAIL PROTECTED]> wrote:
sprintf(szQuery,"select oid from %s where filename =
'%s'",sampletbl,test.htm);

sqlite3_prepare(db,szQuery, 512 , &pStmt, 0);

It is unlikely that szQuery string is 512 characters long. So you instruct SQLite to compile a long string of garbage. sqlite3_prepare most likely fails (I can't help but note that you don't check error code here). Just pass -1 as the third parameter.

errcode = sqlite3_step(pStmt);

But the error code i am getting is 21

This means sqlite3_prepare has failed, pStmt remains uninitialized so you are passing garbage to sqlite3_step.

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to