Re: [sqlite] Error handling

2017-02-15 Thread Igor Tandetnik
On 2/15/2017 10:42 PM, Igor Korot wrote: Now I presume that calling sqlite3_finalize() on the NULL handle is safe? Yes; the documentation explicitly states that. -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Error handling

2017-02-15 Thread Igor Korot
Hi, Richard, On Wed, Feb 15, 2017 at 8:20 PM, Richard Hipp wrote: > On 2/15/17, Igor Korot wrote: >> >> Well, my question here is a bit different - if sqlite3_step () returns an >> error >> should the statement be released? >> > > You still need to invoke

Re: [sqlite] Error handling

2017-02-15 Thread Richard Hipp
On 2/15/17, Igor Korot wrote: > > Well, my question here is a bit different - if sqlite3_step () returns an > error > should the statement be released? > You still need to invoke either sqlite3_finalize() or sqlite3_reset() on the statement. Use sqlite3_finalize() if you

Re: [sqlite] Error handling

2017-02-15 Thread Igor Korot
Hi, Igor, On Feb 15, 2017 7:16 PM, "Igor Tandetnik" wrote: On 2/15/2017 7:02 PM, Igor Korot wrote: > My question is: how many calls to "sqlite3_finalize() should be there? > For every successful call to sqlite3_prepare[_v2], there should eventually be a call to

Re: [sqlite] Error handling

2017-02-15 Thread Igor Tandetnik
On 2/15/2017 7:02 PM, Igor Korot wrote: My question is: how many calls to "sqlite3_finalize() should be there? For every successful call to sqlite3_prepare[_v2], there should eventually be a call to sqlite3_finalize; otherwise, you'd leak a statement, and prevent the database handle from

Re: [sqlite] Error handling anomaly ...

2008-11-26 Thread Igor Tandetnik
Rob Sciuk <[EMAIL PROTECTED]> wrote: > In a test harness, I'm using a sqlite3_prepare/bind/step/finalize > sequence to add rows to a table, and then add them again, > intentionally violating the unique index constraints. It appears > that sqlite3_step reports the violation (sqlite3_errorMessage),

Re: [sqlite] Error handling.

2006-08-27 Thread Jay Sprenkle
On 8/27/06, Anders Aagaard <[EMAIL PROTECTED]> wrote: Jay Sprenkle wrote: > On 8/26/06, Anders Aagaard <[EMAIL PROTECTED]> wrote: >> Hi >> >> Is there any way to handle the different error messages from sqlite >> without doing strcmp? For example SQLITE_CONSTRAINT? > > will the conflict

Re: [sqlite] Error handling.

2006-08-27 Thread Anders Aagaard
Jay Sprenkle wrote: On 8/26/06, Anders Aagaard <[EMAIL PROTECTED]> wrote: Hi Is there any way to handle the different error messages from sqlite without doing strcmp? For example SQLITE_CONSTRAINT? will the conflict handling options do what you need? http://www.sqlite.org/lang_conflict.html

Re: [sqlite] Error handling.

2006-08-27 Thread Jay Sprenkle
On 8/26/06, Anders Aagaard <[EMAIL PROTECTED]> wrote: Hi Is there any way to handle the different error messages from sqlite without doing strcmp? For example SQLITE_CONSTRAINT? will the conflict handling options do what you need? http://www.sqlite.org/lang_conflict.html -- SqliteImporter

Re: [sqlite] Error handling.

2006-08-26 Thread Mark Richards
Looks like you're not alone... http://www.gatago.com/comp/databases/20027474.html /m - To unsubscribe, send email to [EMAIL PROTECTED] -