Yes, I've done extensive debugging to make sure the rowid is valid. I even did a test where I did the INSERT and the SELECT on the same connection and that works okay. It's just when I use 2 different connections that the second connection does not see the rowid that was just added. I ran the CLI on the database file and did a SELECT there and I know that the record exists and the rowid that I'm searching for does exist. But sqlite3_bind_int() inserts a NULL instead of the rowid.
> On Apr 12, 2019, at 1:26 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 12 Apr 2019, at 6:23pm, Jim Dossey <jim.dos...@gmail.com> wrote: > >> I did use sqlite3_last_insert_rowid() to get the last rowid. But I used >> sqlite3_expanded_sql to get the actual SQL statement that was processed to >> find out that sqlite3_bind_int() had inserted a NULL instead of the rowid I >> was looking for. > > Sorry I misunderstood your post. As a debugging test, have you > printed/logged the value received from sqlite3_last_insert_rowid() to make > sure it's the expected value ? > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users