Method RowsProcessed TOracleQuery not work

My query return one row, but the method RowsProcessed not return count.

orclqryOrigem.Close;
orclqryOrigem.SetVariable('codigo', orcldtstFuncApoioORIGEM.AsString);
orclqryOrigem.Execute;
if orclqryOrigem.RowsProcessed > 0 then
orcldtstFuncApoioORIGEM_CALC.Value := orclqryOrigem.Field('descricao');
 
If the query returns a result set, then you should use the Eof property:

Code:
orclqryOrigem.Close;
orclqryOrigem.SetVariable('codigo', orcldtstFuncApoioORIGEM.AsString);
orclqryOrigem.Execute;
if not orclqryOrigem.Eof then
  orcldtstFuncApoioORIGEM_CALC.Value := orclqryOrigem.Field('descricao');

The RowsProcessed property only applies to insert, update and delete statements.
 
Back
Top