A exception in TDataSet.GetFieldData(Field: TField)
Original Reporter info from Mantis: lxpbuaa
-
Reporter name: lxpbuaa
Original Reporter info from Mantis: lxpbuaa
- Reporter name: lxpbuaa
Description:
In DB.pas:
function TDataSet.ActiveBuffer: TDataRecord;
begin
{$ifdef dsdebug}
Writeln ('Active buffer requested. Returning record number: ',ActiveRecord);
{$endif}
Result:=FBuffers[FActiveRecord]; //if the dataset is empty, the FActiveRecord=1
end;
function TDataSet.GetFieldData(Field: TField): JSValue;
begin
//add by lxpbuaa. If the dataset is empty, the FActiveRecord=1, call ActiveBuffer wil raise a exception. Should a judgment be added here?
if FActiveRecord < 0 then
Result := null
else
//end
Result:=GetFieldData(Field,ActiveBuffer);
end;
Steps to reproduce:
With a empty dataset, call a field.AsXXX/value.
Mantis conversion info:
- Mantis ID: 38017
- Build: 1.4.32