preceding spaces and updates

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ccmcbride
Posts: 101
Joined: Tue 01 May 2007 16:36

preceding spaces and updates

Post by ccmcbride » Tue 10 Nov 2009 22:49

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.

Dimon
Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 12 Nov 2009 14:35

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.

ccmcbride
Posts: 101
Joined: Tue 01 May 2007 16:36

Post by ccmcbride » Thu 12 Nov 2009 18:07

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.

Dimon
Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 13 Nov 2009 12:40

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.

Post Reply