On 27 Jun 2009, at 8:47am, chandan wrote:

> const char *create_and_insert = "create table some_tbl (id int primary
> key, version text check (version in (\"1.0\")));"
>    "insert into some_tbl (id) values (1);";
> const char *update_sql = "update some_tbl set version = ? where id  
> = ?";

I note you then do

    ret = sqlite3_bind_int(stmt, 2, 0);

doesn't this look for id=2 ?




To diagnose your problem, first try the whole thing as text: execute  
the command

update some_tbl set version = '1.0' where id = 1

and see if it works.  If it doesn't, try it in sqlite3 command-line  
tool and see if that works.

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

Reply via email to