Michael Ruck wrote:
I don't get an error code. So how should I decide if I should call
sqlite3_last_insert_rowid() or not? :) That's the problem - I don't have any
indication if an insert
was actually performed or if it was simply ignored - thus I don't have any
possibility to decide if the call is valid or not. This makes the OR IGNORE
clause or the sqlite3_last_insert_rowid() function useless for *my
purposes*. I would have never pursued this path in tests, if I would've
known beforehand that it is not reliable if used with ON CONFLICT clauses.

Mike,

It seems to me that you have asked for exactly that behavior by using INSERT OR IGNORE. By using this clause you have said you don't care if a row is inserted or not. Why would you expect an error code?

If you need to know if the insert fails then you should use INSERT OR FAIL. When it fails you will be notified, and you can handle the failure in an appropriate manner.

Dennis Cote

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to