With the following Delphi code in an Aurelius Server application
var
AStatement: IDBStatement;
AData: IDBResultSet;
begin
try
AStatement := Manager.Connection.CreateStatement;
AStatement.SetSQLCommand(rsSQL);
AData := AStatement.ExecuteQuery;
if AData.Next then
begin
Result := TWebFarmField.Create;
Result.ID:= AData.GetFieldValue('ID');
Result.InspectionsID:= AData.GetFieldValue('InspectionsID');
...
end;
I am seeing an error in the line "Result.InspectionsID:= ..."
The error states that AData.GetFieldValue('InspectionsID') is NULL
My Result.InspectionsID is defined as Nullable
type
TWebFarmField = class
ID: Integer;
InspectionsID: Nullable;
...
And I need to be able to pass NULL values into the Result.
How can I cope with this situation?