[EMAIL PROTECTED] wrote:
> A few quick questions...
> 
> If an error is returned by sqlite3_exec( ) , I believe the error message is
> written in the (char **errmsg) provided in the 5 parameter of the function
> call.
> 
>       1. Is this the same error text that can be obtained by
> sqlite3_errmsg( ) ?

Maybe or maybe not.  The error message returned by sqlite3_exec()
might be more detailed.  Depends on the error.

>       2. If this is the same error text that can be obtained by
> sqlite3_errmsg( ), what happens if I call sqlite3_free( ) before
> sqlite3_errmsg( )?
> 

By "the same" I mean the same sequence of bytes.  The error message
from sqlite3_exec() is always obtained from a malloc-like memory
allocator and must be freed using sqlite3_free().  The error message
returned by sqlite3_errmsg() is always a constant, static string.
The error messages might say the same thing, but they are distinct
strings.
--
D. Richard Hipp   <[EMAIL PROTECTED]>

Reply via email to