Subject | How to know if a query is empty with an IB_Cursor |
---|---|
Author | aosylvain |
Post date | 2005-12-28T12:28:46Z |
Hi,
I'm using a TIB_Cursor to know if a query returns an empty result or not.
I'm doing like this :
With MyCursor do begin
Close ;
SQL.Text := 'SELECT ... WHERE ID = :ID' ;
ParamByName('ID').AsInt64 := id ; // id is a parameter of my function
Prepare ;
First ;
Result := not (EOF and BOF) ;
end ;
Ok, it works 90% of times. But sometimes, the Result is false but
should be true.
Am I doing something wrong ?
I'm using a TIB_Cursor to know if a query returns an empty result or not.
I'm doing like this :
With MyCursor do begin
Close ;
SQL.Text := 'SELECT ... WHERE ID = :ID' ;
ParamByName('ID').AsInt64 := id ; // id is a parameter of my function
Prepare ;
First ;
Result := not (EOF and BOF) ;
end ;
Ok, it works 90% of times. But sometimes, the Result is false but
should be true.
Am I doing something wrong ?