Error when calling ApplyUpdates on a TSimpleDataSet connected to Oracle and with TrimFixedChar on

Error when calling ApplyUpdates on a TSimpleDataSet connected to Oracle and with TrimFixedChar on

Postby BenW » Mon 29 Jul 2013 21:06

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
BenW
 
Posts: 9
Joined: Thu 14 May 2009 04:35

Re: Error when calling ApplyUpdates on a TSimpleDataSet connected to Oracle and with TrimFixedChar on

Postby AlexP » Tue 30 Jul 2013 06:56

Hello,

We cannot reproduce the problem. Please send your sample reproducing the problem to alexp*devart*com
AlexP
Devart Team
 
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Error when calling ApplyUpdates on a TSimpleDataSet connected to Oracle and with TrimFixedChar on

Postby AlexP » Wed 31 Jul 2013 10:45

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.
AlexP
Devart Team
 
Posts: 5530
Joined: Tue 10 Aug 2010 11:35


Return to dbExpress driver for Oracle