Access violation during Datasource.State

Hello,

I am getting an Access Violation everytime when i try to check the state of a TOracleDataset.

The access violation appears when i try to execute following code:

If not ((MyOracleDataset.datasource.dataset) in [dsedit]) then
MyOracledataset.edit;

When I don't check the state then it works fine

What am i doing wrong
Thanks Chris
 
I seem to be missing the actual reference to the State property. Shouldn't it be:

If not ((MyOracleDataset.State) in [dsedit]) then
MyOracledataset.edit;
 
Hello Marco,
You're totally right.
I didn't wrote

If not ((MyOracleDataset.datasource.dataset) in [dsedit]) then
MyOracledataset.edit;

But i wrote
If not ((MyOracleDataset.datasource.dataset.state) in [dsedit]) then
MyOracledataset.edit;

then the access violation appears. But you gave me the solution. the state property is actual a property of the OracleDataset. I was confused with other DBcomponents.

Thanks again
Chris
 
Back
Top