RowsAffected TOracleDataSet.ExecSQL

Thanks for your fast answer.
Sorry, but I've to explain more.
My database-access-components are written so that they are independently from the underlying database-system. In most cases the methods-calls use TDataset-Parameters. And an interface manages the correct use of SQL, Parameters, Open and ExecSQL for the used Components.
With most Component-Sets (BDE, Dbx, Ibx, NCOCI) I've solved the problems.
Now I've to do it with DOA.
I'd try it with TOracleDataset which is a descendent of TDataset. A little bit converting Variable Param and all is fine!?
But in some cases I want to know if it has updated exactly one record.
I've done the TOracleDataset.ExecSQL.
But unfortunately TOracleDataset.FQuery.RowsProcessed I can't get, because FQuery is a private field.
TOracleQuery I wouldn't like to use, because all interface-methods have to been rewritten:
TDataset --> TComponent.
So I've to built a
TdbOracleExecSQL = Class(TDataSet).
Which is a small copy of TOracleDataset and a public RowsProcessed-property. And in the interface-methods I've to add "if then else" to switch between TdbOracleExecSQL and TOracleDataset.
Is there any shorter solution?
 
I assume you mean:

TdbOracleExecSQL = Class(TOracleDataSet);

You could then simply use something like:

RowsProcessed := InternalQuery.RowsProcessed;

That would be the best way. InternalQuery is a protected function that returns the OracleQuery instance of the dataset.
 
Back
Top