Hi all,
static const char *cmd = "CREATE TABLE cert_store_table ( certNumber
INTEGER primary key , certTypeLen INTEGER , certType TEXT , validFlag TEXT,
certData BLOB , lastRowFlag INTEGER)";
static const char *updateCmd = "UPDATE cert_store_table set lastRowFlag =
:lastRowFlag where lastRowFlag = :lastRowFlag;" ;
I added one row in the database
sqlite> select * from cert_store_table;
1|4|X509|VALID|0����|1
returnCode = sqlite3_prepare(dbHandle, updateCmd, strlen(updateCmd), &stmt,
&tail);
if( returnCode!=SQLITE_OK )
{
printf("Can't prepare update cmd in database: %s\n",
sqlite3_errmsg(dbHandle));
sqlite3_close(dbHandle);
}
sqlite3_bind_int(stmt, 1, 0);
sqlite3_bind_int(stmt, 2, 1 );
returnCode = sqlite3_step(stmt);
printf("returnCode : %d\n",returnCode);
Is there any wrong in the above code ?
If i update on the command line using the command , it is working.What is
the issue ??????????????????????
sqlite> select * from cert_store_table;
1|4|X509|VALID|0����|1
sqlite> update cert_store_table set lastRowFlag = 0 where lastRowFlag = 1;
sqlite> select * from cert_store_table;
1|4|X509|VALID|0����|0
Thanks in advance,
Waiting for your reply,
Aravind.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users