Subject Calculated fields
Author Sascha.Mi@t-online.de
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