Subject | Re: [IBO] TIB_Query: Problem with SQL Parsing? |
---|---|
Author | dp078 |
Post date | 2003-09-09T15:18:11Z |
Hello,
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.
Sender.SQL.Text := ReplaceStr (Sender.SQL.Text, #$D#$A, ' ');
while putting that code in BeforeOpen handler, and reporting a
problem there. Please deisregard. BeforePrepare event works just
fine.
Thank you,
D.P.
> How did the CR and LF characters get in there? How are yousetting 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 thatBy "patch" code I meant the following line, literally:
> >patch code) didn't fire at all before opening TIB_Query. Why?
>
> What do you mean by "patch code".
Sender.SQL.Text := ReplaceStr (Sender.SQL.Text, #$D#$A, ' ');
> Do you understand that, if you get anYes I do, however, that was apparently a mental block I suffered
> exception during Prepare, the BeforeOpen event never fires?
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.