Commit 12111001 authored by mse1's avatar mse1

* Delphi compatibility.

git-svn-id: https://mseide-msegui.svn.sourceforge.net/svnroot/mseide-msegui/trunk@3038 56ecf5fe-6917-0410-8ac6-ca8e178bccbf
parent 5557a9ab
......@@ -157,7 +157,7 @@ type
implementation
uses
Math, DBConst;
Math, DBConst,msedatabase;
{$define ODBCVER3}
(* odbc type nums
......@@ -1171,7 +1171,8 @@ begin
end; // is a blob
SQL_NUMERIC,SQL_DECIMAL:
begin
if decimaldigits > 4 then begin
if (decimaldigits > 4) and
(dbo_bcdtofloatif in controller.options) then begin
FieldType:= ftFloat;
FieldSize:= 0;
end
......
......@@ -485,12 +485,21 @@ end;
procedure scaleexp10(var value: currency; const exp: integer);
begin
{$ifdef FPC}
if exp < 0 then begin
int64(value):= int64(value) div int64exp10ar[-exp];
end
else begin
int64(value):= int64(value) * int64exp10ar[exp];
end;
{$else}
if exp < 0 then begin
pint64(@value)^:= pint64(@value)^ div int64exp10ar[-exp];
end
else begin
pint64(@value)^:= pint64(@value)^ * int64exp10ar[exp];
end;
{$endif}
end;
procedure swaprgb1(var value: cardinal);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment