Hi.
We have some strange "trailing spaces " errors in our databases. The error seems to occur not always, but very often.
In MemData.pas there is a property called TrimVarChar.
There is no setters to this property, only getters.
Could this be a bug?
( I'm using version 4.25.8 )
TData.TrimVarChar
Hi. I have no DBAccess file, do you mean OLEDBAccess.pas?
The only this regarding Trim is the following sequence:
at row 9827 in mentioned file.
My problem is that I get a lot of trailing spaces on my VarChar fields in the database and I cannot find the problem (other than this, perhaps)
I do declare to trim fixed char, but I cannot fins the option to trim varchar.
I'm using this:
The only this regarding Trim is the following sequence:
Code: Select all
if Field.Fixed then
t := TrimFixedChar
else
t := TrimVarChar;
at row 9827 in mentioned file.
My problem is that I get a lot of trailing spaces on my VarChar fields in the database and I cannot find the problem (other than this, perhaps)
I do declare to trim fixed char, but I cannot fins the option to trim varchar.
I'm using this:
Code: Select all
Params.Values['TrimFixedChar'] := 'TRUE';
Hmmm...
Review the codeexample again...
What state does the variable t get if the field-variable isn't fixed.
Because the TrimVarChar property are never set which mens that it get whatever is in memory when the application allocates the memoryspace.
I would say this might be a bug.
I did an example and added
in the TData constructor, and then the Varchar fields was trimmed.
Where is the variable TrimVarchar being set to true or false?
Review the codeexample again...
Code: Select all
if Field.Fixed then
t := TrimFixedChar
else
t := TrimVarChar;
Because the TrimVarChar property are never set which mens that it get whatever is in memory when the application allocates the memoryspace.
I would say this might be a bug.
I did an example and added
Code: Select all
TrimVarChar := true
Where is the variable TrimVarchar being set to true or false?
This code is also used in another our product (SDAC). But TrimVarChar is not available from connection parameters in DbxSda (like TrimFixedChar). If you want to enable it, you should change sources of DbxSda like you described in your previous post.