DOA Driver unable to work with datLargeAutoInc, datLargeUInt and datDecimal fields

delphi

(Christen Blom Dahl) #1

Current implementation of function uDADOADriver.DataTypeDaToOra(AType: TDADataType) returns value otNumber when the aType param has the values datLargeAutoInc, datLargeUInt or datDecimal.
This value is not handled by TOracleDataSet.DeclareVariable which is called by SetDataSetParams.SetDataSetParams throwing an exception with message ‘Unsupported variable type’.

The solution is to modify function uDADOADriver.DataTypeDaToOra as follows:

function DataTypeDaToOra(AType: TDADataType): Integer;
const
  Error = 'INTERNAL: not supported by DOA';
begin
  Result := otString;
  case AType of
    datUnknown: raise Exception.Create(Error);
    datGuid, datString,datFixedChar: Result := otString;
    datDateTime: Result := otDate;
    datSingleFloat, datFloat, datCurrency: Result := otFloat;
    datByte,
    datShortInt,
    datWord,
    datCardinal,
    datAutoInc,
    datInteger,
    datLargeInt: Result := otInteger;
    datBoolean: Result := otInteger; // needs a special handling
    datMemo: Result := otClob;
    datBlob: Result := otBlob;
    datXml,
    datWideMemo: Result := otClob;
    datFixedWideChar,
    datWideString: Result := otString;
    datLargeAutoInc, datLargeUInt,datDecimal: Result := otFloat;
  end;
end;

(RemObjects) #2

Thanks, logged as bugs://81205


(RemObjects) #3

bugs://81205 got closed with status fixed.