* Support for smallint fields, bug #8417

git-svn-id: trunk@6789 -
This commit is contained in:
joost 2007-03-11 19:50:22 +00:00
parent 132e4f6f67
commit dcc62c3ccc
3 changed files with 11 additions and 6 deletions

View File

@ -441,7 +441,7 @@ begin
TrLen := SQLLen; TrLen := SQLLen;
end; end;
SQL_SHORT : SQL_SHORT :
TrType := ftInteger; TrType := ftSmallint;
SQL_LONG : SQL_LONG :
begin begin
LensSet := True; LensSet := True;
@ -818,6 +818,11 @@ begin
FillByte(buffer^,sizeof(LargeInt),0); FillByte(buffer^,sizeof(LargeInt),0);
Move(CurrBuff^, Buffer^, SQLDA^.SQLVar[x].SQLLen); Move(CurrBuff^, Buffer^, SQLDA^.SQLVar[x].SQLLen);
end; end;
ftSmallint :
begin
FillByte(buffer^,sizeof(Smallint),0);
Move(CurrBuff^, Buffer^, SQLDA^.SQLVar[x].SQLLen);
end;
ftDate, ftTime, ftDateTime: ftDate, ftTime, ftDateTime:
GetDateTime(CurrBuff, Buffer, SQLDA^.SQLVar[x].SQLType); GetDateTime(CurrBuff, Buffer, SQLDA^.SQLVar[x].SQLType);
ftString : ftString :

View File

@ -1,7 +1,7 @@
[Database] [Database]
; This file contains several sections, one for each database-type. Select here ; This file contains several sections, one for each database-type. Select here
; which database has to be tested currently. ; which database has to be tested currently.
type=dbf type=interbase
@ -59,10 +59,10 @@ hostname=192.168.1.1
[interbase] [interbase]
connector=sql connector=sql
connectorparams=interbase connectorparams=interbase
name=/path/to/database.fdb name=/opt/firebird/data/test.fdb
user=sysdba user=sysdba
password=masterkey password=rosivrepus
hostname=192.168.1.1 hostname=127.0.0.1
[odbc] [odbc]
connector=sql connector=sql

View File

@ -81,7 +81,7 @@ const
testValuesCount = 25; testValuesCount = 25;
testFloatValues : Array[0..testValuesCount-1] of double = (-maxSmallint-1,-maxSmallint,-256,-255,-128,-127,-1,0,1,127,128,255,256,maxSmallint,maxSmallint+1,0.123456,-0.123456,4.35,12.434E7,9.876e-5,123.45678,2.4,3.2,0.4,23); testFloatValues : Array[0..testValuesCount-1] of double = (-maxSmallint-1,-maxSmallint,-256,-255,-128,-127,-1,0,1,127,128,255,256,maxSmallint,maxSmallint+1,0.123456,-0.123456,4.35,12.434E7,9.876e-5,123.45678,2.4,3.2,0.4,23);
testIntValues : Array[0..testValuesCount-1] of integer = (-maxInt,-maxInt+1,-maxSmallint-1,-maxSmallint,-256,-255,-128,-127,-1,0,1,127,128,255,256,maxSmallint,maxSmallint+1,MaxInt-1,MaxInt,100,130,150,-150,-132,234); testIntValues : Array[0..testValuesCount-1] of integer = (-maxInt,-maxInt+1,-maxSmallint-1,-maxSmallint,-256,-255,-128,-127,-1,0,1,127,128,255,256,maxSmallint,maxSmallint+1,MaxInt-1,MaxInt,100,130,150,-150,-132,234);
testSmallIntValues : Array[0..testValuesCount-1] of smallint = (-maxSmallint,-maxSmallint+1,-256,-255,-128,-127,-1,0,1,127,128,255,256,maxSmallint,maxSmallint-1,100,110,120,130,150,-150,-132,234,231,42); testSmallIntValues : Array[0..testValuesCount-1] of smallint = (-maxSmallint,-maxSmallint+1,-256,-255,-128,-127,-1,0,1,127,128,255,256,maxSmallint,maxSmallint-1,100,110,120,130,150,-150,-132,234,-15567,42);
testLargeIntValues : Array[0..testValuesCount-1] of smallint = (-MaxSIntValue,MaxSIntValue+1,-maxInt-1,-maxInt+1,-maxSmallint,-maxSmallint+1,-256,-255,-128,-127,-1,0,1,127,128,255,256,maxSmallint,maxSmallint-1,maxSmallint+1,MaxInt-1,MaxInt,MaxSIntValue-1,MaxSIntValue,235253244); testLargeIntValues : Array[0..testValuesCount-1] of smallint = (-MaxSIntValue,MaxSIntValue+1,-maxInt-1,-maxInt+1,-maxSmallint,-maxSmallint+1,-256,-255,-128,-127,-1,0,1,127,128,255,256,maxSmallint,maxSmallint-1,maxSmallint+1,MaxInt-1,MaxInt,MaxSIntValue-1,MaxSIntValue,235253244);
testBooleanValues : Array[0..testValuesCount-1] of boolean = (true,false,false,true,true,false,false,true,false,true,true,true,false,false,false,false,true,true,true,true,false,true,true,false,false); testBooleanValues : Array[0..testValuesCount-1] of boolean = (true,false,false,true,true,false,false,true,false,true,true,true,false,false,false,false,true,true,true,true,false,true,true,false,false);
testStringValues : Array[0..testValuesCount-1] of string = ( testStringValues : Array[0..testValuesCount-1] of string = (