Error, when filtering a CLOB field and posting changes that excludes the row from the filtered dataset
Error, when filtering a CLOB field and posting changes that excludes the row from the filtered dataset
Hi Dear ODAC Support Team,
I've found another problem with ODAC Datasets and CLOB fields.
As usual I send a sample app that demonstrates the problem to alex_p at devart.
I have a TSmartQuery, that loads data containing a CLOB field.
Then I apply a filter on that CLOB field.
Now I change the value of that field so that it doesn't match anymore with the
filter condition.
When I post the record, ODAC seems to make a duplicate of the original record.
You can test this, if you uncheck the checkbox "keep changes local", you get
a primmary key constraint error on table EMP then.
When you keep changes local, you should get a "TOraClob.Free RefCount = 0" Assertion
in MemData.pas line 8933 on closing the dataset.
I work with the latest ODAC version (9.5.18).
The duplicated row can be seen in my real application as well:
I have a Tree bound to such a datasource and when I clear the filter, I can
see a duplicate of the changed data row.
Interestingly the recordcount is still the old, so I think there is something
going wrong internally.
The error shows up only when filtering a CLOB field. When I apply the filter on a
VARCHAR field, everything is ok. You can test this by unchecking the
checkbox "Filter CLOB-Field". The filter is then applied to the field JOB.
My demo application uses the EMP table from the scott/tiger sample schema and
adds a CLOB field (CLOB_TEST) as a copy of the JOB field.
Just use the button "Create CLOB Field" to create the field and the
button "Drop CLOB Field" when you're done with the test.
And of course you have to change the constant myServer.
Thanks for your help.
With regards
Stefan "ostijo" Grosskreutz
I've found another problem with ODAC Datasets and CLOB fields.
As usual I send a sample app that demonstrates the problem to alex_p at devart.
I have a TSmartQuery, that loads data containing a CLOB field.
Then I apply a filter on that CLOB field.
Now I change the value of that field so that it doesn't match anymore with the
filter condition.
When I post the record, ODAC seems to make a duplicate of the original record.
You can test this, if you uncheck the checkbox "keep changes local", you get
a primmary key constraint error on table EMP then.
When you keep changes local, you should get a "TOraClob.Free RefCount = 0" Assertion
in MemData.pas line 8933 on closing the dataset.
I work with the latest ODAC version (9.5.18).
The duplicated row can be seen in my real application as well:
I have a Tree bound to such a datasource and when I clear the filter, I can
see a duplicate of the changed data row.
Interestingly the recordcount is still the old, so I think there is something
going wrong internally.
The error shows up only when filtering a CLOB field. When I apply the filter on a
VARCHAR field, everything is ok. You can test this by unchecking the
checkbox "Filter CLOB-Field". The filter is then applied to the field JOB.
My demo application uses the EMP table from the scott/tiger sample schema and
adds a CLOB field (CLOB_TEST) as a copy of the JOB field.
Just use the button "Create CLOB Field" to create the field and the
button "Drop CLOB Field" when you're done with the test.
And of course you have to change the constant myServer.
Thanks for your help.
With regards
Stefan "ostijo" Grosskreutz
Re: Error, when filtering a CLOB field and posting changes that excludes the row from the filtered dataset
Hello,
Thank you for the sample, we have reproduced the described problem and will investigate the reason for such behavior.
Thank you for the sample, we have reproduced the described problem and will investigate the reason for such behavior.
Re: Error, when filtering a CLOB field and posting changes that excludes the row from the filtered dataset
We have already fixed the problem. The fix will be included in the next version, which will be released the next week.
Re: Error, when filtering a CLOB field and posting changes that excludes the row from the filtered dataset
Thanks for the good news.
Looking forward for the next release ...
Looking forward for the next release ...
Re: Error, when filtering a CLOB field and posting changes that excludes the row from the filtered dataset
Hello again,
I just tried your new release 9.6.19 and there is good and bad news:
When I run the test in local mode, (LocalUpdate := True), everything is fine, I don't get the "TOraClob.Free RefCount = 0" Assertion anymore.
But when I run the test with LocalUpdate := False (Checkbox "keep changes local' is unchecked), I get a key constraint error when I run the test.
Hint: To run the test properly it's necessary to uncheck the checkbox *before* pressing "Start".
I send you (alex_p) a new version of my test, where this checkbox works in the desired way, so you can really toggle between "local" and "write"-mode.
Could you please have a look at the example and confirm this error?
Thanks for you efforts.
With regards
Stefan "ostijo" Grosskreutz
I just tried your new release 9.6.19 and there is good and bad news:
When I run the test in local mode, (LocalUpdate := True), everything is fine, I don't get the "TOraClob.Free RefCount = 0" Assertion anymore.
But when I run the test with LocalUpdate := False (Checkbox "keep changes local' is unchecked), I get a key constraint error when I run the test.
Hint: To run the test properly it's necessary to uncheck the checkbox *before* pressing "Start".
I send you (alex_p) a new version of my test, where this checkbox works in the desired way, so you can really toggle between "local" and "write"-mode.
Could you please have a look at the example and confirm this error?
Thanks for you efforts.
With regards
Stefan "ostijo" Grosskreutz
Re: Error, when filtering a CLOB field and posting changes that excludes the row from the filtered dataset
Thank you for the sample, we have reproduced the described case, and will fix it as soon as possible
Re: Error, when filtering a CLOB field and posting changes that excludes the row from the filtered dataset
Thank you for the sample, we have reproduced the described case, and will fix it as soon as possible