Page 1 of 1
Trimfixeschar
Posted: Thu 19 May 2005 20:01
by Guest
Trimfixedchar options is wrong run or I am wrong use. How can I use trimfixedchar options.
I need get trimed field when I call field from SQL Server.
NOTE : I have bad english. I am sorry everybody.
Posted: Fri 20 May 2005 08:39
by Ikar
TrimFixedChar works only for fields with fixed length. See description of this property in SDAC help.
Posted: Mon 23 May 2005 11:48
by Guest
I know that, but I am using varchar field. It is running only char field, but not run varchar field. What are you proposing to me.
Posted: Mon 23 May 2005 14:44
by Ikar
We couldn't reproduce the problem.
Please send us (sdac*crlab*com) complete small sample to demonstrate it and include script to create server objects.
TrimFixedChar BDE vs SDAC
Posted: Tue 06 Dec 2005 21:22
by jfpicard
Got the same problem here with TrimFixedChar and I think that I know how to reproduce it.
If I have a varchar(6) field on the BD and the field got trailing blanks like
'05 ', when I do FieldByName on that Field, it returns '05 '. On BDE, it returns '05'.
Hope you will find and correct the problem soon
Thanks.
Posted: Thu 08 Dec 2005 10:12
by Ikar
VARchar is field type with variable length. As I said before, TrimFixedChar works only for fields with fixed length.
Posted: Thu 08 Dec 2005 15:04
by jfpicard
I'm doing the conversion from BDE to SDAC here and we got problems with fields that are varchar and got trailing space (probably from the conversion of char to varchar). We got over 300 programs and 2500 tables. We can't do a varchar to char conversion of all tables or add TrimRight to all ours programs.
Maybe we can come to a compromise. How about addind a new property named TrimTrailingSpaces that will trim the trailing space of all string and char fields ? This way, we can have the same behavior as BDE with the TMSQuery.
Thanks.
Posted: Fri 09 Dec 2005 12:03
by Ikar
Thank you for information. We reproduced the problem and fixed it. This fix will be included in next build.
As temporary solution just set TMSQuery.Options.FlatBuffers to True.
Posted: Tue 03 Jan 2006 14:49
by jfpicard
If I may ask, I was thinking that the problem was corrected in the 3.55.2.22 version.
But I've recompiled all my packages to get the same result with a varchar field on my DB. If i got a varchar(2) field named test that contain 'A ' and I do the following code (With TrimFixedChar to true) :
MSQuery1.FieldByName('test').AsString = 'A'
the result is false.
Can you give me the details of the bug fix in the version 3.55.2.22 about TrimFixedChar ?
Thanks.
Posted: Thu 05 Jan 2006 13:56
by Ikar
> the result is false.
Do you mean SDAC 3.55.2.21 and earlier?
> Can you give me the details of the bug fix in the version 3.55.2.22 about TrimFixedChar ?
It's rather complicated, but in a few words bug appeared only if FlatBuffers property is set to True and field type is varchar and field length > 32
Posted: Thu 05 Jan 2006 14:40
by jfpicard
No, the result is false with the new version 3.55.2.22.
But I worked a fix in the components (We bought the source code). So maybe I can send you the files with the fixes and my little improvement on TVirtualTable ?
Thanks.
Posted: Fri 06 Jan 2006 10:41
by Ikar
> No, the result is false with the new version 3.55.2.22.
Please send us (sdac*crlab*com) a complete small test project to reproduce the problem; it is desirable to use Northwind or Master schema objects otherwise include definition of your own database objects; don't use third party components.
> But I worked a fix in the components (We bought the source code).
> So maybe I can send you the files with the fixes and my little
> improvement on TVirtualTable ?
Usually we don't apply improvements from users.