>
>Subject: Re: [sqlite] How can SQLite return indication of where SQL failed?
> From: "Peter Bartholdsson" <[EMAIL PROTECTED]>
> Date: Mon, 17 Jan 2005 03:21:25 +0100
> To: [email protected]
>
>On Sun, 16 Jan 2005 02:42:52 -0800, <[EMAIL PROTECTED]> wrote:
>
>> I'm using Delphi 4 and various versions of SQLite wrapper.
>> To begin, my only desire is to write SQL in a text box and
>> execute it.
>>
>> What I'd like if a pointer to the place in the SQL where
>> the syntax fails, and I'm presuming the in-DLL parser is
>> capable of telling me that.
>>
>> How can I get that information back?
>
>If you're using SQLite 3 use the sqlite3_errmsg function.
>Granted, that assumes the wrapper supports it.
Yes, one of the SQLite wrappers has the function
function SQLite3_ErrMsg (db: TSQLiteDB): PChar; cdecl;
external 'sqlite3.dll' name 'sqlite3_errmsg';
If this is unique to 3+, that explains why some of my
wrapper/component tests would raise an exception with
a message something like "error near 'CREATD'" and
others didn't.
Since there is no numeric value returned, I assume I'll
have to do a search on the source text for the quoted
string and highlight it.
Thanks