|Subject||Re: [IBO] Varchar with #0 char in it|
At 10:36 AM 14/03/2008, you wrote:
>I have a varchar in a FB database that has a Char(0) in the middle ofI'm not sure if it is pertinent, but are you referring to the field using .Value or .AsString? The .Value method does save extra code in loops but the downside is it accesses the values as variants and relies on Delphi to do the casting. That does increase the risk of undesired effects such as (possibly) the encounter with the ascii-zero causing the string to be interpreted as null-terminated. I always use the casting methods where possible...
>the string that results in the string being truncated.
>Here is what I am doing:
>1) At the TIBODatabase level, I've set .DefaultNoTrimming to True
>2) I am using a TIBOQuery with .RequestLive to true.
>3) The field is a domain, defined as:
> CREATE DOMAIN DM_VARCHAR48_8859_2 AS
> VARCHAR(48) CHARACTER SET ISO8859_2
> COLLATE ISO8859_2
>Right before assigning the string to the field, I check the string
>value, but it is instantly truncated.
>Any suggestions on how to fix this? It's urgent.