3.7. Supported database types for Parameter Maps and Result Maps

Table 3.5 shows the basic Supported DbTypes for Parameter Maps and Result Maps for .NET that come with the System.Data and System.Data.OracleClient assemblies. See the .NET Developer Guide section on configuring the DataMapper to work with your provider's DbTypes.

[Note]Note

Nuallable type from .NET 2.0 are fully supported by iBATIS.NET.

The .NET Framework data provider type of a Parameter object is inferred from the .NET Framework type of the Value of the Parameter object, or from the DbType of the Parameter object. The following table shows the inferred Parameter type based on the object passed as the Parameter value or the specified DbType. You may specify the type of a Parameter in a generic fashion by setting the DbType property of the Parameter object to a particular System.Data.DbType specific to your database.

Table 3.5. Supported DbTypes for Parameter Maps and Result Maps (.NET)

CLR TypeiBATIS supportSqlDbTypeOleDbTypeOdbcTypeOracleType
Byte[]YesBinary, Image, VarBinaryBinary, VarBinaryBinary, Image, VarBinaryRaw
Boolean, bool?YesBitBooleanBitByte
Byte, byte?YesTinyInt-TinyIntByte
DateTime, DateTime?YesDateTime, SmallDateTimeDateDate, DateTime, SmallDateTime, TimeDateTime
char, char?YesNot supportedCharCharByte
Decimal, decimal?YesDecimal, Money, SmallMoneyDecimal, Currency, NumericDecimal, NumericNumber
Double, double?YesFloatDoubleDoubleDouble
Guid, Guid?YesUniqueIdentifierGuidUniqueIdentifierRaw
Int16, Int16?YesSmallIntSmallIIntSmallIntInt16
Int32, Int32?YesIntIntegerIntInt32
Int64, Int64?YesBigIntBigIntBigIntNumber
Single, Single?YesRealSingleRealFloat
StringYesChar, Nchar, NVarchar, Text, VarCharChar, VarCharChar, NChar, NText, NVarChar, Text, VarCharNVarChar, VarChar
TimeSpanNoNot supportedDBTimeTimeDateTime
UInt16, UInt16?yesInt--UInt16
UInt32, UInt32?yesDecimal--UInt32
UInt64, UInt64?yesDecimal--Number