Subject | Re: [IBO] PROBLEMS TIBOQuery.RecordCount |
---|---|
Author | Daniel Rail |
Post date | 2002-02-01T18:29:42Z |
At 01/02/2002 02:15 PM, you wrote:
Second make sure that the property RecordCountAccurate is set to True.
Give this a try and let us know.
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)
>varFirst of all, do a Prepare before assigning the parameters.
> 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?
Second make sure that the property RecordCountAccurate is set to True.
Give this a try and let us know.
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)