During preparation of query under Yaffil thrown exception "'.' is not a valid integer value".
Corrected code of GetMajorServerVersion function in unit IBCClasses.pas:
Code: Select all
function TGDSConnection.GetMajorServerVersion: integer;
var
VersionString: string;
DotPos: Integer; // *** New line
begin
if FMajorServerVersion = 0 then begin
if IsFBServer then
VersionString := FDatabaseInfo.FBVersion
else
VersionString := FDatabaseInfo.Version;
if Length(VersionString) >= 7 then begin
{*** Old code
FMajorServerVersion := StrToInt(VersionString[5]);
FMinorServerVersion := StrToInt(VersionString[7]);
}
// *** Start of new code
DotPos := Pos('.', VersionString);
if (DotPos > 1) and (DotPos < Length(VersionString)) then begin
FMajorServerVersion := StrToInt(VersionString[DotPos - 1]);
FMinorServerVersion := StrToInt(VersionString[DotPos + 1]);
end;
// *** End of new code
end;
end;
Result := FMajorServerVersion;
end;
Fill any legal select query in IBCQuery. Add all fields as persistent in fields editor and create new calculated field type string with size 1.
Write OnCalcFields event like:
Code: Select all
procedure TForm1.IBCQuery1CalcFields(DataSet: TDataSet);
begin
with DataSet do
FieldByName('FIELD1').AsString := '*';
end;
Any combination of Options property of IBCQuery cannot solve this problem. But calculated field type char(2) works fine!
Delphi 7 and IBDac 2.10
Sorry for my "english"!