Subject Re: [IBO] TIB_Query: Problem with SQL Parsing?
Author dp078
Hello,

> How did the CR and LF characters get in there? How are you
setting the SQL
> property?

CR and LF characters are standard line-breaking characters in
Windows text (strings of a multi-line control).
They are being put in there by TIB_Query component itself, more
precisely, by its embedded TStrings object (SQL property): "When
reading Text, the strings in the list will be separated by carriage
return and line feed" (from Delphi online help).
TIB_Query should have parse TStrings properly, but it looks as it
doesn't.

> >On a separate note, BeforeOpen event (where I tried to put that
> >patch code) didn't fire at all before opening TIB_Query. Why?
>
> What do you mean by "patch code".

By "patch" code I meant the following line, literally:
Sender.SQL.Text := ReplaceStr (Sender.SQL.Text, #$D#$A, ' ');

> Do you understand that, if you get an
> exception during Prepare, the BeforeOpen event never fires?

Yes I do, however, that was apparently a mental block I suffered
while putting that code in BeforeOpen handler, and reporting a
problem there. Please deisregard. BeforePrepare event works just
fine.

> More info >>> better help.

Couldn't agree more :)

Thank you,
D.P.