Subject | Problem with OnCalculateField |
---|---|
Author | Stuart Hunt |
Post date | 2004-01-14T09:52:20Z |
Hi,
Ihave recently upgraded to IB Objects 4.2Ib from 3.3Ba and most of
our code works fine. However, our OnCalculateField events have
started padding string fields. We use ARow.ByName('XXX').AsString to
get the value, and this used to return the string trimmed but now
seems to return the string padded. For example, code to return
someones name:
procedure TfrmDocSel.qryDocumentCalculateField(Sender: TIB_Statement;
ARow: TIB_Row; AField: TIB_Column);
begin
AField.AsString:=ARow.ByName('FORENAME').AsString+' '+
ARow.ByName('SURNAME').AsString;
end;
Now returns "Stuart Hunt " instead of "Stuart
Hunt". I use calculated fields a lot and therefore don't want to have
to manually trim the fields for al lthese cases.
I have also ensured that the connection's DefaultNoTrimming property
is FALSE.
Does anyone know what I'm doing wrong, or is this a problem with this
version of IBObjects and should I upgrade?
Thanks in advance,
Stuart Hunt
Ihave recently upgraded to IB Objects 4.2Ib from 3.3Ba and most of
our code works fine. However, our OnCalculateField events have
started padding string fields. We use ARow.ByName('XXX').AsString to
get the value, and this used to return the string trimmed but now
seems to return the string padded. For example, code to return
someones name:
procedure TfrmDocSel.qryDocumentCalculateField(Sender: TIB_Statement;
ARow: TIB_Row; AField: TIB_Column);
begin
AField.AsString:=ARow.ByName('FORENAME').AsString+' '+
ARow.ByName('SURNAME').AsString;
end;
Now returns "Stuart Hunt " instead of "Stuart
Hunt". I use calculated fields a lot and therefore don't want to have
to manually trim the fields for al lthese cases.
I have also ensured that the connection's DefaultNoTrimming property
is FALSE.
Does anyone know what I'm doing wrong, or is this a problem with this
version of IBObjects and should I upgrade?
Thanks in advance,
Stuart Hunt