Mike Johnston wrote: > So I'm using the last_insert_rowid() with no issue. The note at > http://www.sqlite.org/c3ref/last_insert_rowid.html states that the > function returns unpredictable results should "a separate thread" do > a new insert. Does that apply to a separate process as well? > > I have two processes collecting data from two separate sources > happily inserting into a single sqlite database. Is there a > possiblity last_insert_rowid() may return a bogus value in this > context? (Both processes are single threaded). Thanks in advance, >
No, you will be fine. The last_insert_rowid is maintained on a per connection basis. Each process has its own connection, and hence its own last_insert_rowid value. The two processes use file locking to provide exclusion when they are updating the database. HTH Dennis Cote _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users