Access Violation on TfrxDBDataset.GetValue
Alex,
We are with problem of access violation in the line of the GetValue function of the TfrxDBDataSet component:
Result: = Field(Fields.Objects).value
Was everything functioning correctly until installing version 3.04 started there to give this problem. The only alteration in this function is that the function does not exist more initialize1.
The error is occurring when the function tries to make the Cast of the object for TField. TField(Fields.Objects).Value
What it can be wrong?
Please !!! Help-me !!!
Edson Martins
Brasil
We are with problem of access violation in the line of the GetValue function of the TfrxDBDataSet component:
Result: = Field(Fields.Objects).value
Was everything functioning correctly until installing version 3.04 started there to give this problem. The only alteration in this function is that the function does not exist more initialize1.
The error is occurring when the function tries to make the Cast of the object for TField. TField(Fields.Objects).Value
What it can be wrong?
Please !!! Help-me !!!
Edson Martins
Brasil
Comments
The GetValue function before:
function TfrxDBDataset.GetValue(Index: String): Variant;
var
i,j: Integer;
begin
if not FInitialized then
Open;
i := Fields.IndexOf(Index);
if i <> -1 then
Result := TField(F.Objects).value
else
begin
Result := Null;
ReportRef.Errors.Add(ReportRef.CurObject + ': ' +
frxResources.Get('dbFldNotFound') + ' ' + UserName + '."' + Index + '"');
end;
end;
Alterei a fun?§??o para:
function TfrxDBDataset.GetValue(Index: String): Variant;
var
i,j: Integer;
nField : TField;
begin
if not FInitialized then
Open;
i := Fields.IndexOf(Index);
if i <> -1 then
begin
nField := FDS.FindField(Index);
Result := NField.Value;
end
else
begin
Result := Null;
ReportRef.Errors.Add(ReportRef.CurObject + ': ' +
frxResources.Get('dbFldNotFound') + ' ' + UserName + '."' + Index + '"');
end;
end;
We had that to modify all lines TField(F.Objects).value.
Edson