Thanks you for your help!
Jason Alburger
HID/NAS/LAN Engineer
L3/ATO-E En Route Peripheral Systems Support
609-485-7225
[EMAIL PROTECTED]
07/05/2006 03:34 To
PM [email protected]
cc
Please respond to Subject
[EMAIL PROTECTED] Re: [sqlite] sqlite3_free()
te.org
[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]>