|Subject||Re: [IBO] Varchar with #0 char in it|
> I'm not sure if it is pertinent, but are you referring to the fieldhere is my code:
> 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...
procedure TdmDatabase.SetEncryptedFieldText(Sender: TField; const
if Sender.DataSet.FieldByName('Encrypted').AsBoolean then
lID := ...
if not (Sender.Dataset.State in dsEditModes) then
Sender.AsString := GeneralFunctions.GetEncryptedData(Text, lID, ...);
any other ideas?