"Matthew Allen" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
> I have a table with the following fields:
>
> {"Id", "INTEGER PRIMARY KEY AUTOINCREMENT"},
> {"ParentId", "INTEGER"},
> {"Name", "TEXT"},
> {"Unread", "INTEGER"},
> {"Open", "INTEGER"},
> {"ItemType", "INTEGER"},
> {"Sort", "INTEGER"},
> {"Threaded", "INTEGER"},
>
> And I prepare a statement using the SQL:
>
> insert into MyTable values (?,?,?,?,?,?,?,?)
>
> Then a bind the values to that statement and write it to the DB. That
> all works except for the TEXT field "Name". I'm calling
> sqlite3_bind_text like this:
>
> char *Name = "Something";
> sqlite3_bind_text(Stmt, 3, (const char*)Name, -1, SQLITE_STATIC);
>
> And it return SQLITE_OK, however the value in the DB is NULL, or an
> empty string.

How do you determine this?

I don't see any obvious problems in the code you've shown. The problem 
must lie in the code you haven't shown. Can you post a small sample that 
reproduces the problem?

Igor Tandetnik 



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

Reply via email to