TOracledataset QBEDefinition

Betz

Member²
Dear all,

I have a problem with an Oracle dataset.
I use DirectOracle V4.0.
I have also sent this request by mail. Please answer only one of them.

I have two ToracleDataset in my application.
Both Datasets include a field IDNR.

Its not possible to do a master-detail structure because of other features of the application.
Initially the first TOracleDataset is set into QBEMode=true.
My procedure is the following.

I do a QBE on the second TOracleDataset. The result is a list of IDNR. When I doubleclick on an IDNR in the secold Toracledataset, the QBEdefinition of the first TOracleDataset should be changed.

To do this, I use the following procedure on the first TOracleDataset

for x:=0 to DM.OdsStamm.QBEDefinition.FieldCount-1 do begin
DM.OdsStamm.QBEDefinition.Fields[x].Value:='';
DM.OdsStamm.QBEDefinition.Fields[x].LastValue:='';
end;

DM.OdsStamm.QBEMode:=true;

DM.OdsStamm.EnableControls;
DM.OdsStamm.QBEDefinition.FieldByName('IDNR').Value:=IDNR;
DM.OdsStamm.QBEDefinition.FieldByName('IDNR').LastValue:=IDNR;

DM.OdsStamm.executeQBE;

This procedure works when I have aready done an QBE on the first TOracleDataset.
(The result is only the dataset with this IDNR value.

When I do this procedure directly after start of the program without having done a QBE on the first TOracleDataset. The procedure runs, but as result I get always all datasets if TOracleDataset1.
The Value and Lastvalue of the QBEDefinition are not set to the value of IDNR.

Can you tell me what I have to do, so that the procedure works without having done an QBE on TOracledataset1 manually.

Thanks

Ulrich Betzenbichler
 
Hello,
On a request by Marco Kalter I made additional detailed tests and I found the problem.
My query uses stored procedures for some fields.
This fields were set to Queryable in QBEDefinition, but by content of the query, this fields cannot be queryable.
After removing the queryable flag from this fields, it works.
Thanks Marco for your help.
 
Back
Top