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. Certainly not the "Something" I pass in. All the integer fields are
written successfully so I know it's mostly working. The string is valid utf-8,
null terminated C-string.
What am I missing here?
--
Matthew Allen
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users