Subject Re: [IBO] Calculated fields
Author Jason Wharton
Turn off AutoFetchFirst and see if that makes a difference.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: <Sascha.Mi@...>
To: "IBO Mailingliste" <IBObjects@yahoogroups.com>
Sent: Wednesday, March 20, 2002 12:42 PM
Subject: [IBO] Calculated fields


> Hi,
>
> using calculated fields I've implemented the following event handler.
> Another
> field in the same row is copied to the calculated field. The first time
the
> handler is called all other fields are NULL, all further times there are
no
> problems. IBO version is 4.2GB. Is access to other fields in that
> handler not
> (yet) provided?
>
> AutoFetchAll = true
> AutoFetchFirst = true
>
> void __fastcall TAnschriftenFrame::IB_Q_AnredenCalculateField(
> TIB_Statement *Sender, TIB_Row *ARow, TIB_Column *AField)
>
> {
> if ( AField->FieldName == "BES1" )
> {
> TIB_Column * Test;
> Test=ARow->ByName("\"Bes_Name1\"");
> AnsiString bes = ARow->GetColumnValue("\"Bes_Name1\"");
> bes = Test->Value;
> AField->Value = ARow->GetColumnValue("\"Bes_Name1\"");
> }
> else if ( AField->FieldName == "BES2" )
> {
> AField->Value = ARow->GetColumnValue("\"Bes_Name2\"");
> }
>
> }
>
>
> I've sent some error descriptions earlier. Were they comprehensible?
>
>
> Regards,
> Sascha Michel