- Recompilación en Delphi10 de todos los paquetes de RO para generar las DCU's en Lib\D10 - Recompilación en Delphi10 de todos los paquetes de DA para generar las DCU's en Lib\D10 git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.RemObjects@9 b6239004-a887-0f4b-9937-50029ccdca16
61 lines
2.0 KiB
PHP
61 lines
2.0 KiB
PHP
{
|
|
!!! DO NOT REMOVE THIS FILE !!!
|
|
|
|
It's included with an $I directive in the SDAC and ODAC driver units and it's used in
|
|
their implementation of the IDAMustSetParams
|
|
|
|
}
|
|
procedure WriteCrLabsParamValues(InputParams : TDAParamCollection; OutputParams: TDAParams; IgnoreBlobType : boolean = false);
|
|
var i : integer;
|
|
par : uDAInterfaces.TDAParam;
|
|
outpar : DBAccess.TDAParam;
|
|
blobtype : TFieldType;
|
|
begin
|
|
for i := 0 to (InputParams.Count-1) do begin
|
|
par := InputParams[i];
|
|
outpar := OutputParams.ParamByName(par.Name);
|
|
|
|
// If no blob type is specified, then gets the default field type.
|
|
// BlobType is only meaningful to Oracle. MSSQL works fine just setting the DataType
|
|
blobtype := BlobTypeMappings[par.BlobType];
|
|
if (blobtype=ftUnknown)
|
|
then blobtype := DADataTypesMappings[par.DataType];
|
|
|
|
case par.DataType of
|
|
datBlob : begin
|
|
outpar.ParamType := TParamType(par.ParamType);
|
|
outpar.DataType := DADataTypesMappings[par.DataType];
|
|
if VarIsNull(par.Value) then
|
|
outpar.Clear
|
|
else begin
|
|
if VarIsArray(par.Value) then
|
|
outpar.Value := VariantBinaryToString(par.Value)
|
|
else
|
|
outpar.Value := par.Value;
|
|
end;
|
|
end;
|
|
datMemo : begin
|
|
outpar.ParamType := TParamType(par.ParamType);
|
|
outpar.DataType := ftMemo;
|
|
|
|
// Only happens with Oracle
|
|
if not IgnoreBlobType and (blobtype<>ftUnknown) then
|
|
outpar.DataType := blobtype;
|
|
|
|
if VarIsNull(par.Value) then
|
|
outpar.Clear
|
|
else
|
|
outpar.Value := par.Value;
|
|
end;
|
|
else begin
|
|
outpar.ParamType := TParamType(par.ParamType);
|
|
outpar.DataType := DADataTypesMappings[par.DataType];
|
|
if VarIsNull(par.Value)
|
|
then outpar.Clear
|
|
else outpar.Value := par.Value;
|
|
end;
|
|
end; { case }
|
|
end; { for }
|
|
end;
|
|
|