Subject Re: [IBO] PROBLEMS TIBOQuery.RecordCount
Author hans@hoogstraat.ca
henriquelemos wrote:
>
> var
> Qry2 : TIBOQuery;
> begin
>
> Qry2 := TIBOQuery.Create(Application);
>
> with Qry2 do
> begin
> DatabaseName := 'DATAMETA'
> SQL.Add('Select *From PRODUTOS_SALDOS');
> SQL.Add('Where CODIG_PRODUTO =:Produto and');
> SQL.Add(' DOCUMENTO =:Doc');
> ParamByname('Produto').AsInteger := CodigProduto;
> ParamByname('Doc').AsString := D;
> Open;
>
> if RecordCount <> 0 then <<<--- The mistake happens here:
> .....
>
> ISC ERROR CODE: 335544569
>
> ISC ERROR MESSAGE:
> Dynamic SQL Error
> SQL code error = -104
> Token unknown -line2, char -1
> Where
>
> STATEMENT:
> IBOInternalDataset:
> "<TApplication>.<TIBOQuery>.<TIBOInternalDataset>."
>
> Which the problem?
>
> Carlos H. Lemos
>
> ------------------------ Yahoo! Groups Sponsor ---------------------~-->
Apart from the missing prepare, unless a typo,
maybe try
SQL.Add('Select * From PRODUTOS_SALDOS'); instead
of
SQL.Add('Select *From PRODUTOS_SALDOS');

====

> Sponsored by VeriSign - The Value of Trust
> Secure all your Web servers now - with a proven 5-part
> strategy. The FREE Server Security Guide shows you how.
> http://us.click.yahoo.com/uCuuSA/VdiDAA/yigFAA/PhFolB/TM
> ---------------------------------------------------------------------~->
>
> ___________________________________________________________________________
> 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 !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/