On Apr 12, 2019, at 3:27 PM, Keith Medcalf <[email protected]> wrote: > > >> To be a little more specific, the problem happens when I try to do >> sqlite3_bind_int() on the prepared statement using the new rowid. It >> doesn't use the rowid it uses NULL. >> >> The prepared statement is "SELECT * FROM sessiond WHERE rowid=?;" >> Then I call sqlite3_bind_int(ppStmt, 1, rowid) and the resulting >> SELECT command is >> SELECT * FROM "sessiond" WHERE "rowid"=NULL; >> Which is obtained by calling sqlite3_expanded_sql(). > > This does not make sense. It indicates that you did not actually bind a > value to the parameter in question >
It may not make sense, but that is what happened. I tried it repeatedly with different values for rowid. In every case, if the rowid did not exist in the table, sqlite3_bind_int() would insert NULL in place of the '?' Instead of the rowid. The rowid's I was using were in the range of 10 to 25, so there were no extreme values. _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

