Subject | To Carlos Cantu Re: Problem com IBOQuery.Parambyname |
---|---|
Author | Helen Borrie |
Post date | 2005-01-06T12:12:18Z |
Carlos Cantu, do you want to take care of this question?
thks
Helen
At 12:02 PM 6/01/2005 +0000, dallagnello wrote:
thks
Helen
At 12:02 PM 6/01/2005 +0000, dallagnello wrote:
>I am migrando of BDE for IBO. very I am worried, therefore it has
>places that the systems are being slower of the one than was. I
>modified the component query for IBOQuery. When trying to pass
>parameter occurs the error of DYNAMIC SQL ERROR SQL ERROR CODE = -
>104, SQL was vĂ¡lidado in ibexpert and is correct. It follows
>below
>the code source:
>
> IBOQUERY.CLOSE;
> IBOQUERY.SQL.CLEAR;
> IBOQUERY.SQL.ADD('SELECT');
> IBOQUERY.SQL.ADD('1');
> IBOQUERY.SQL.ADD('2');
> IBOQUERY.SQL.ADD('3');
> IBOQUERY.SQL.ADD('4');
> IBOQUERY.SQL.ADD('WHERE');
>
> IBOQUERY.SQL.ADD('A.DT_RECL between :DT_RECL1 and :DT_RECL2 ');
> IBOQUERY.SQL.ADD('AND');
> IBOQUERY.ParamByname('DT_RECL1').AsDateTime := eddata1.date;
> IBOQUERY.ParamByname('DT_RECL2').AsDateTime := eddata2.date;
>
> IBOQUERY.SQL.ADD('((A.Nr_OS = :NR_OS) OR (A.NR_LGI = :NR_OS)) ');
> IBOQUERY.SQL.ADD('AND');
> IBOQUERY.ParamByname('NR_OS').Text := edNR_OS.text;
>
> IBOQUERY.Close;
> IBOQUERY.SQL.Strings[0] := 'SELECT A.NR_OS, A.CD_CONMUL, ';
> IBOQUERY.SQL.Strings[1] := 'FROM TAB_OS A ';
> IBOQUERY.SQL.Strings[2] := '';
> IBOQUERY.SQL.Strings[3] := '';
> IBOQUERY.SQL.Strings[4] := '';
> IBOQUERY.SQL.Strings[5] := 'WHERE';
> IBOQUERY.SQL.ADD('ORDER BY A.DT_RECL');
> IBOQUERY.open;
>
>
>
>
>
>
>
>
>
>
>___________________________________________________________________________
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>___________________________________________________________________________
>http://www.ibobjects.com - your IBO community resource for Tech Info papers,
>keyword-searchable FAQ, community code contributions and more !
>Yahoo! Groups Links
>
>
>
>