Page 1 of 1

preceding spaces and updates

Posted: Tue 10 Nov 2009 22:49
by ccmcbride
I have a weird issue, using sdac 4.70.0.46, Delphi 2007 and mssql 2008.
I have a table.
I have editors.
When I delete or add a preceding space in a field on the record, the field does not get updated to the database.
i.e, I deleted a preceding space on the name, and added a preceding space to an address line.
dbmonitor shows other fields being updated, but not these two fields, so the actual data does not get updated:
UPDATE Cust
SET
AddressBlock = ?, BillAddressBlock = ?, MailAddressBlock = ?, EditDateTime = ?, EditCount = ?
WHERE
RecUID = ?
Is there a flag I should or should not be setting?
it seems that it is not updating unchanged fields (which is fine), but these fields ARE changing.

Posted: Thu 12 Nov 2009 14:35
by Dimon
I could not reproduce the problem.
Please send me a complete small sample to dmitryg*devart*com to demonstrate it, including a script to create and fill table.

Posted: Thu 12 Nov 2009 18:07
by ccmcbride
okay, I have sent you a test project and a small database.
all you have to do to recreate is to edit one of the records, add or remove a preceding space, post the record, refresh the record. Change was not saved to the database.

Posted: Fri 13 Nov 2009 12:40
by Dimon
Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next SDAC build.
As a temporary solution you can set the TrimVarChar option to False.