2.0.4.13130 на 2.1.3.18185 перестала работать UDF
-----------------------------------------------------------------------------------
PAS -----------------------------------------------------------------------------
Код: Выделить всё
function ib_util_malloc(Size: Integer): PChar; cdecl; external 'ib_util.dll';
function AddRecordToHistorySvr2( var History : TBLOb;
var Istoc : Integer;
var Date: TIBDateTime;
var Price,
PriceM : Double;
Var TimePr,
TimePrM : Integer;
Valuta : Integer;
var LengRec : Integer
):PChar ; cdecl; export;
var
Steps : String;
GotLength : Integer;
begin
with History do
begin
if (not Assigned(Handle)) or
(TotalLength = 0)
then Result := ib_util_malloc(LengRec+2)
else
begin
GotLength := 0;
Result := ib_util_malloc(TotalLength+LengRec+2);
GetSegment(Handle, Result+2, TotalLength, GotLength);
end;
GotLength := TotalLength;
PSmallInt(Result)^ := LengRec+TotalLength;
end;
PInteger(Result+2+GotLength+0)^ := Istoc;
PInteger(Result+2+GotLength+4)^ := Integer(Date.Days-15018);
PDouble (Result+2+GotLength+8)^ := Price;
if(LengRec>16) then
begin
PInteger(Result+2+GotLength+16)^ := Round(PriceM);
Result[2+GotLength+20] := Chr(TimePr and $ff);
Result[2+GotLength+21] := Chr(TimePrM and $ff);
Result[2+GotLength+22] := Chr(Valuta and $ff);
Result[2+GotLength+23] := #0;
end;
end;
DDL ----------------------------------------------------------------------
Код: Выделить всё
DECLARE EXTERNAL FUNCTION ADDRECORDTOHISTORYSVR2
BLOB,
INTEGER,
DATE,
DOUBLE PRECISION,
DOUBLE PRECISION,
INTEGER,
INTEGER,
INTEGER,
INTEGER
RETURNS VARCHAR(32000) FREE_IT
ENTRY_POINT 'AddRecordToHistorySvr2' MODULE_NAME 'REALTOUDF';
Ошибка ----------------------------------------------------------------------
04.02.2010; 13:16:58 EFIBInterBaseError: DMOD.qrTemp:
Overflow occurred during data type conversion.Filter not found to convert type 1 to type 2.
At procedure 'PRODAJA_INSERT_GUID1_ALLFIELDS' line: 473, col: 1
At procedure 'MOVETOARCHIV2' line: 203, col: 7.
; SQLText="select opstep from movetoarchiv2(:ipbase, :ipDate1, :ipDate2, :ipDate3, :ipStep)
"