TOracleDataSet.Optimize

dhd

Member
I set Optimization:=true and don't do Close to the query.
But the result of the query's Open is always the same row - no matter the values of the parameters I set.

To be more clear:
1. Query.sql.add('...');
2. Query.DeclareVariable(....);
3. Query.Optimize:=true;
and in a loop:
- Query.SetVariable(....);
- Query.Open;

I set each time diferent value to the parameter, but it always returns the same row!

Am I doing something wrong?
 
TDataSet.Open does nothing if it is already opened (Active = True). You should call Open for this first case, and Refresh for subsequent variable values.
 
Back
Top