On 11 Mar 2011, at 2:26pm, Igor Tandetnik wrote: > Eugene N <neverov.biks.0...@gmail.com> wrote: >> The problem is, i dont know how to *DETECT* a collision gracefully. > > You try to insert, and it fails with SQLITE_CONSTRAINT error. > >> I first thought of looking at an error code, but i am not sure its a good >> idea. > > What are error codes for, in your opinion?
Rather than 'error codes', which implies something went wrong, let's call them 'result codes' so they have less connotation of "you shouldn't have done that": <http://www.sqlite.org/c3ref/c_abort.html> although further down the page it does switch to 'error codes', which should probably be cleared up sometime. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users