Hi,
Our current code uses dbxoda40.dll (5.1.3.0), a TCRSqlConnection component with a TSimpleDataset to update a table on an Oracle database. We have TrimFixedChar = True. This works without error when modifying a field and calling ApplyUpdates.
If I replace the TCRSqlConnection with a TSQLConnection component instead (as recommended since D2007) I get the error "Record not found or changed by another user" when calling ApplyUpdates. Setting TrimFixedChar = False solves the error but we need TrimFixedChar = True.
I've created a sample XE2 project that reproduces the problem. It creates a table then inserts a record, modifies it on the SimpleDataSet then calls applyupdates to post the change back to the database.
I couldn't see how to attach it to this post so let me know the best way to send it to you.
I've tried a number of things and even used the latest 6.2.3.0 version of the dll with the DriverName = "DevartOracle" but still get the same error. I can also reproduce in both D2007 and XE2.
Any help you can provide in helping us move to the latest dbxoda dll will be greatly appreciated
Thanks,
Ben
Error when calling ApplyUpdates on a TSimpleDataSet connected to Oracle and with TrimFixedChar on
Re: Error when calling ApplyUpdates on a TSimpleDataSet connected to Oracle and with TrimFixedChar on
Hello,
We cannot reproduce the problem. Please send your sample reproducing the problem to alexp*devart*com
We cannot reproduce the problem. Please send your sample reproducing the problem to alexp*devart*com
Re: Error when calling ApplyUpdates on a TSimpleDataSet connected to Oracle and with TrimFixedChar on
Hello,
Since your table has no key fields, the condition in the Update query is formed by all fields, and since the string data in the table is inserted with spaces and the FixedChar option is enabled, then these strings are trimmed when substituting the data into parameters. To solve the problem, you should either add a key field to the table (with a non-Char type), or not use the FixedChar option.
Since your table has no key fields, the condition in the Update query is formed by all fields, and since the string data in the table is inserted with spaces and the FixedChar option is enabled, then these strings are trimmed when substituting the data into parameters. To solve the problem, you should either add a key field to the table (with a non-Char type), or not use the FixedChar option.