Igor Tandetnik a écrit : > Olivier FAURAX <ofau...@neotion.com> wrote: >> I'm beginner and uses sqlite3. >> I'm trying to record informations in a database, but this fails. >> I have followed http://www.sqlite.org/c3ref/stmt.html >> >> rc = sqlite3_open(DB_FILENAME, &metadata_db); >> rc = sqlite3_exec(metadata_db, >> "CREATE TABLE IF NOT EXISTS metadata " >> "( filename TEXT, key INT, data BLOB, length INT);", >> NULL, NULL, >> &error); >> rc = sqlite3_prepare_v2(metadata_db, >> "INSERT INTO metadata VALUES " >> "( ?1, ?2, ?3, ?4 );", >> 0, &sthl, NULL); > > The third parameter (where you pass 0) is the length of the string > pointed to by second parameter. So, you effectively pass an empty string > to sqlite3_prepare_v2. You must specify an actual string length, or -1 > to have the function calculate it automatically.
Thanks for your answer. I tried with -1 and the length value of the string, but it didn't help... Have a nice day -- Olivier FAURAX _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users