I'm using System.Data.SQLite and the following problem comes up:

I'm doing an INSERT of some columns in a TABLE. I have to determine now if the INSERT was successful. I'm doing this by putting the INSERT in a try { do the insert...and try the UPDATE } catch { do nothing};

In case the INSERT fails because of a KEY clash the UPDATE isn't executed either. But in case the INSERT is successful I would like to do the UPDATE right afterwards on the same ROW that has been inserted last. You may argue, why I don't try the full INSERT right away. Reason: a large BLOB has to be read inand the statement be prepared.
And I could safe that, if the INSERT would fail anyway.

Is there something like UPDATE into last ROW that has  been inserted?

--
Christoph



_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to