Data Type Mapping




Mapping data types into different environments like .Net and SQL server.

ASP.NET Control DNN KickStart Field type .NET
Framework
SQL
Server
ADO
DataType
Enum
ADO
DataType
Enum
Value
Size Access Oracle Visual
Basic
6.0
Int64
SqlDbType.BigInt
OleDbType.BigInt
bigint adBigInt 20 8 Variant
Byte[]
SqlDbType.VarBinary
OleDbType.Binary
binary
timestamp
adBinary 128 50
8
Raw Variant
Yes/No Boolean
SqlDbType.Bit
OleDbType.Boolean
bit adBoolean 11 1
2
YesNo Boolean
String
OleDbType.BSTR
adBSTR 8
(DataReader) adChapter 136
Text
Document
String
SqlDbType.Char
OleDbType.Char
char adChar 129 X Char String
Money Decimal
SqlDbType.Money
OleDbType.Currency
money
smallmoney
adCurrency 6 8
4
0
Currency Currency
DateTime
OleDbType.DBDate
adDate 7 0 DateTime Date
DateTime
OleDbType.DBDate
adDBDate 133
DBFileTime adDBFileTime 137
DateTime
OleDbType.DBTime
adDBTime 134
Date
Time
DateTime
SqlDbType.DateTime
OleDbType.DBTimeStamp
datetime
smalldatetime
adDBTimeStamp 135 8
4
0
DateTime Date Date
Decimal
OleDbType.Decimal
adDecimal 14 Decimal Variant 6
Double
SqlDbType.Float
OleDbType.Double
float adDouble 5 8
0
Double Float Double
Empty adEmpty 0
External-Exception
OleDbType.Error
adError 10
DateTime
OleDbType.Filetime
adFileTime 64
Guid
SqlDbType.UniqueIdentifier
OleDbType.Guid
uniqueidentifier adGUID 72 16 ReplicationID Variant
Object
OleDbType.IDispatch
adIDispatch 9
Identifier
Number
Int32
SqlDbType.Int
OleDbType.Integer
identity
int
adInteger 3 4
4
AutoNumber
Long Integer
Int Long
Object
OleDbType.IUnknown
adIUnknown 13
Byte[]
SqlDbType.VarBinary
OleDbType.LongVarBinary
image adLongVarBinary 205 2147483647 OLEObject Long Raw
Blob
Variant
String
SqlDbType.VarChar
OleDbType.LongVarChar
text adLongVarChar 201 2147483647 Memo
Hyperlink
Long
Clob
String
String
SqlDbType.NText
OleDbType.VarWChar
ntext adLongVarWChar 203 1073741823 Memo
Hyperlink
NClob String
Decimal
SqlDbType.Decimal
OleDbType.Decimal
decimal
numeric
adNumeric 131 9 Decimal Decimal
Integer
Number
SmallInt
Variant
Object
OleDbType.PropVariant
adPropVariant 138
Single
SqlDbType.Real
OleDbType.Single
real adSingle 4 4 Single Single
Int16,
SqlDbType.SmallInt
OleDbType.SmallInt
smallInt adSmallInt 2 2 Integer Integer
Byte
OleDbType.TinyInt
adTinyInt 16
UInt64
OleDbType.UnsignedBigInt
adUnsignedBigInt 21
UInt32
OleDbType.UnsignedInt
adUnsignedInt 19
UInt16
OleDbType.UnsignedSmallInt
adUnsignedSmallInt 18
Byte
SqlDbType.TinyInt
OleDbType.UnsignedTinyInt
tinyInt adUnsignedTinyInt 17 1 Byte Byte
adUserDefined 132
Byte[]
SqlDbType.VarBinary
OleDbType.VarBinary
varbinary adVarBinary 204 50 ReplicationID Variant
String
SqlDbType.VarChar
OleDbType.VarChar
varchar adVarChar 200 X Text VarChar String
Object
SqlDbType.Variant
OleDbType.Variant
sql_variant adVariant 12 8016 VarChar2 Variant
OleDbType.VarNumeric adVarNumeric 139
String
SqlDbType.NVarChar
OleDbType.VarWChar
nvarchar adVarWChar 202 X Text NVarChar2 String
String
SqlDbType.NChar
OleDbType.WChar
nchar adWChar 130 X String

and the Managed Extensions for C++. The table also includes entries for the Object and String classes, for which many languages have corresponding keywords.

Category Class name Description Visual Basic data type C# data type Managed Extensions for C++ data type JScript data type
Integer Byte An 8-bit unsigned integer. Byte byte char Byte
SByte An 8-bit signed integer.Not CLS-compliant. SByteNo built-in type. sbyte signed char SByte
Int16 A 16-bit signed integer. Short short short short
Int32 A 32-bit signed integer. Integer int int-or-

long

int
Int64 A 64-bit signed integer. Long long __int64 long
UInt16 A 16-bit unsigned integer.Not CLS-compliant. UInt16No built-in type. ushort unsigned short UInt16
UInt32 A 32-bit unsigned integer.Not CLS-compliant. UInt32No built-in type. uint unsigned int-or-

unsigned long

UInt32
UInt64 A 64-bit unsigned integer.Not CLS-compliant. UInt64No built-in type. ulong unsigned __int64 UInt64
Floating point Single A single-precision (32-bit) floating-point number. Single float float float
Double A double-precision (64-bit) floating-point number. Double double double double
Logical Boolean A Boolean value (true or false). Boolean bool bool bool
Other Char A Unicode (16-bit) character. Char char wchar_t char
Decimal A 96-bit decimal value. Decimal decimal Decimal Decimal
IntPtr A signed integer whose size depends on the underlying platform (a 32-bit value on a 32-bit platform and a 64-bit value on a 64-bit platform). IntPtrNo built-in type. IntPtrNo built-in type. IntPtrNo built-in type. IntPtr
UIntPtr An unsigned integer whose size depends on the underlying platform (a 32- bit value on a 32-bit platform and a 64-bit value on a 64-bit platform).Not CLS-compliant. UIntPtrNo built-in type. UIntPtrNo built-in type. UIntPtrNo built-in type. UIntPtr
Class objects Object The root of the object hierarchy. Object object Object* Object
String An immutable, fixed-length string of Unicode characters. String string String* String

2 Comments

  1. Posted July 30, 2008 at 1:11 pm | Permalink

    This is realy a treasure.

  2. Singanan
    Posted September 18, 2008 at 9:16 am | Permalink

    helping a lot


Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*