Article View: borland.public.delphi.database
Article #17Re: SQL parse error
From: Dr. Oliver Maas
Date: Fri, 25 Jul 2003 00:35
Date: Fri, 25 Jul 2003 00:35
42 lines
2600 bytes
2600 bytes
Hi,
are you sure that your SQL syntax is correct?
I guess one needs a quoted parameter name, theres (in procedure
TIBSQL.PreprocessSQL) some parsing done about " chars inside the SQL
string.
The following is an extract from TIBSQL.PreprocessSQL
(...)
begin
{ collect the name of the parameter }
if iCurParamState = ParamDefaultState then
begin
if cCurChar = '"' then
iCurParamState := ParamQuoteState
else if (cCurChar in ['A'..'Z', 'a'..'z', '0'..'9', '_',
'$']) then
sParamName := sParamName + cCurChar
else if FGenerateParamNames then
begin
sParamName := 'IBXParam' + IntToStr(iParamSuffix);
Inc(iParamSuffix);
iCurState := DefaultState;
slNames.Add(sParamName);
sParamName := '';
end
else
IBError(ibxeSQLParseError, [SParamNameExpected]); // <-
!!
end
else begin
{ determine if Quoted parameter name is finished }
if cCurChar = '"' then
begin
(...)
regards
Oliver
Technical Details
Message-ID:
<4d1ba0cc.0307240801.1730b3ed@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mailReferences:
<3f194299$0$49110$e4fe514c@news.xs4all.nl> <3f19f873$0$8307$4d4ebb8e@news.nl.uu.net> <bfj7s8$bf1$1@news.boerde.de> <3f1eec9a$0$49107$e4fe514c@news.xs4all.nl> <3f1f15f4$0$8304$4d4ebb8e@news.nl.uu.net> <3f1f66de$0$49106$e4fe514c@news.xs4all.nl>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff75c,7a329eac3d9933a8 X-Google-Attributes: gidff75c,public X-Google-Thread: f6386,7a329eac3d9933a8 X-Google-Attributes: gidf6386,public X-Google-Thread: 115d96,7a329eac3d9933a8 X-Google-Attributes: gid115d96,public X-Google-Thread: 10de66,7a329eac3d9933a8 X-Google-Attributes: gid10de66,public X-Google-ArrivalTime: 2003-07-24 17:36:00 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail From: o.maas@metrohm.de (Dr. Oliver Maas) Newsgroups: borland.public.delphi.database,borland.public.delphi.database.desktop,borland.public.delphi.database.multi-tier,borland.public.delphi.database.sqlservers Subject: Re: SQL parse error Date: 24 Jul 2003 17:35:53 -0700 Organization: http://groups.google.com/ Lines: 42 Message-ID: <4d1ba0cc.0307240801.1730b3ed@posting.google.com> References: <3f194299$0$49110$e4fe514c@news.xs4all.nl> <3f19f873$0$8307$4d4ebb8e@news.nl.uu.net> <bfj7s8$bf1$1@news.boerde.de> <3f1eec9a$0$49107$e4fe514c@news.xs4all.nl> <3f1f15f4$0$8304$4d4ebb8e@news.nl.uu.net> <3f1f66de$0$49106$e4fe514c@news.xs4all.nl> NNTP-Posting-Host: 213.217.124.11 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1059093355 21520 127.0.0.1 (25 Jul 2003 00:35:55 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 25 Jul 2003 00:35:55 GMT