Patch by Lacak, mantis #28432

- adds missing Microsoft specific types (I am not sure if it is best add them to generic ODBC, but two MS specific types are alredy there so I added remaining 4)
- for conversion function I have added NtoLE to be sure that number are in little endian as expected by ODBC

git-svn-id: trunk@31153 -
This commit is contained in:
marco 2015-06-24 18:57:20 +00:00
parent cdfe930c31
commit 8b9daedf10

View File

@ -130,7 +130,11 @@ const
SQL_TYPE_DATE = 91;
SQL_TYPE_TIME = 92;
SQL_TYPE_TIMESTAMP= 93;
// MS SQL Server types
// Microsoft has -150 thru -199 reserved for Microsoft SQL Server Native Client driver usage.
SQL_SS_VARIANT = -150;
SQL_SS_UDT = -151;
SQL_SS_XML = -152;
SQL_SS_TABLE = -153;
SQL_SS_TIME2 = -154;
SQL_SS_TIMESTAMPOFFSET = -155;
{$endif}
@ -1780,8 +1784,8 @@ begin
Result.sign:=0;
c := -c;
end;
n := int64(c);
for i:=0 to 15 do begin
n := NtoLE(int64(c));
for i:=0 to high(Result.val) do begin
Result.val[i] := n and $ff;
n := n shr 8;
end;