clientdataset and trimming fixed char fields

saigonij <[email protected]>
Newsgroups gmane.comp.lang.delphi.programming
Message-ID <[email protected]>
All,

Im using Delphi 7 ( no updates ), Win2k sp 3

i have a problem with a clientdataset looking ( eventually ) to a database that is using fixed char fields. 

Table a has fields that are lookup codes, these codes are "d  " or "r  " or "11 " for example. the lookup display fields are created manually. ( the tlookuplist is created from another clientdataset and also contrain un-trimmed strings such as "d  ", "r  " etc ).

There is a special db lookup combobox that i enhanced to display these.

Everything works great until i make a change and posst it back to the database. It then seems that the clientdataset is refreshed, but with trimmed data. Im not sure where it gets the data, but if it was from the database it would not be trimmed.

 

so my problem is that once the trimmed data comes back in to the clientdataset, the lookups no longer work. there is a onchangedata event attached to the fdatalink object with in the combobobox ( exactly the same as in all data-aware controls so i will not explain what it does ) that gets fired, and inside this, it attempts to update the text property with the correct itemindexed value, but now the trimmed data does not match any value, e.g. "d" <> "d  ", so the item index is -1, and no text is displayed...

 

there is a disablestringstrim property ( or something spelt almost the same ! ) on the clientdataset but this does not help....

where is the new data coming from, is the clientdataset merging the new data ( from its delta ? ) with existing items???? 

This is annoying bug that i can fudge, but i want to fix it right.... any suggestions?

 

Ian.


---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

[Non-text portions of this message have been removed]


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Free shipping on all inkjet cartridge & refill kit orders to US & Canada. Low prices up to 80% off. We have your brand: HP, Epson, Lexmark & more.
http://www.c1tracking.com/l.asp?cid=5510
http://us.click.yahoo.com/GHXcIA/n.WGAA/ySSFAA/i7folB/TM
---------------------------------------------------------------------~->

CodeCoffer - new Delphi code protection Tool!
http://www.delphicollection.com/public/CodeCoffer.htm
---------------------------------------------------------------
Unsubscribe:[email protected]
List owner:[email protected]
--------------------------------------------------------------- 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.