Mappatura tipi di Visual Basic 6, Access, SQL Server e .NET Framework
a cura di Oscar Zanin (requisiti: nessuno)

ADO
DataType
Enum
ADO
DataType
Enum
Value
.NET
Framework
SQL
Server
Size Access Visual
Basic
6.0
adBigInt 20 Int64
SqlDbType.BigInt 8
OleDbType.BigInt 9
bigint 7 8 Variant
adBinary 128 Byte[]
SqlDbType.VarBinary 8
OleDbType.Binary 9
binary
timestamp
50
8
Variant
adBoolean 11 Boolean
SqlDbType.Bit 8
OleDbType.Boolean 9
bit 1
2
YesNo Boolean
adBSTR 8 String
OleDbType.BSTR 9
adChapter 136 (DataReader)
adChar 129 String
SqlDbType.Char 8
OleDbType.Char 9
char X String
adCurrency 6 Decimal
SqlDbType.Money 8
OleDbType.Currency 9
money
smallmoney
8
4
0
Currency Currency
adDate 7 DateTime
OleDbType.DBDate 9
0 DateTime 2 Date
adDBDate 133 DateTime
OleDbType.DBDate 9
adDBFileTime 137 DBFileTime 9
adDBTime 134 DateTime
OleDbType.DBTime 9
adDBTimeStamp 135 DateTime
SqlDbType.DateTime 8
OleDbType.DBTimeStamp 9
datetime
smalldatetime
8
4
0
DateTime 1 Date
adDecimal 14 Decimal
OleDbType.Decimal 9
Variant 6
adDouble 5 Double
SqlDbType.Float 8
OleDbType.Double 9
float 8
0
Double Double
adEmpty 0 Empty 9
adError 10 External-Exception
OleDbType.Error 9
adFileTime 64 DateTime
OleDbType.Filetime 9
adGUID 72 Guid
SqlDbType.UniqueIdentifier 8
OleDbType.Guid 9
uniqueidentifier 5 16 ReplicationID 2,3 Variant
adIDispatch 9 Object
OleDbType.IDispatch 9
adInteger 3 Int32
SqlDbType.Int 8
OleDbType.Integer 9
identity 4
int
4
4
AutoNumber
Long Integer
Long
adIUnknown 13 Object
OleDbType.IUnknown 9
adLongVarBinary 205 Byte[]
SqlDbType.VarBinary 8
OleDbType.LongVarBinary 9
image 2147483647 OLEObject Variant
adLongVarChar 201 String
SqlDbType.VarChar 8
OleDbType.LongVarChar 9
text 2147483647 Memo 1, 2
Hyperlink 1, 2
String
adLongVarWChar 203 String
SqlDbType.NText 8
OleDbType.VarWChar 9
ntext 5 1073741823 Memo 3
Hyperlink 3
String
adNumeric 131 Decimal
SqlDbType.Decimal 8
OleDbType.Decimal 9
decimal
numeric
9 Decimal 3 Variant 6
adPropVariant 138 Object
OleDbType.PropVariant 9
adSingle 4 Single
SqlDbType.Real 8
OleDbType.Single 9
real 4 Single Single
adSmallInt 2 Int16
SqlDbType.SmallInt 8
OleDbType.SmallInt 9
smallInt 2 Integer Integer
adTinyInt 16 Byte
OleDbType.TinyInt 9
adUnsignedBigInt 21 UInt64
OleDbType.UnsignedBigInt 9
adUnsignedInt 19 UInt32
OleDbType.UnsignedInt 9
adUnsignedSmallInt 18 UInt16
OleDbType.UnsignedSmallInt 9
adUnsignedTinyInt 17 Byte
SqlDbType.TinyInt 8
OleDbType.UnsignedTinyInt 9
tinyInt 1 Byte Byte
adUserDefined 132
adVarBinary 204 Byte[]
SqlDbType.VarBinary 8
OleDbType.VarBinary 9
varbinary 50 ReplicationID 1 Variant
adVarChar 200 String
SqlDbType.VarChar 8
OleDbType.VarChar 9
varchar X Text 1, 2 String
adVariant 12 Object
SqlDbType.Variant 8
OleDbType.Variant 9
sql_variant 7 8016 Variant
adVarNumeric 139 OleDbType.VarNumeric 9
adVarWChar 202 String
SqlDbType.NVarChar 8
OleDbType.VarWChar 9
nvarchar 5 X Text 3 String
adWChar 130 String
SqlDbType.NChar 8
OleDbType.WChar 9
nchar 5 X String
  1. ODBC Driver (3.51.171300): Microsoft Access Driver (*.mdb), Access 97 (3.5 format)
  2. OLE DB Provider: Microsoft.Jet.OLEDB.3.51, Access 97 (3.5 format)
  3. OLE DB Provider: Microsoft.Jet.OLEDB.4.0 , Access 2000 (4.0 format)
  4. OLE DB Provider: SQLOLEDB, SQL Server 6.5
  5. OLE DB Provider: SQLOLEDB, SQL Server 7.0 +
  6. The VB Decimal data type can only be used within a Variant, that is, you cannot declare a VB variable to be of type Decimal
  7. OLE DB Provider: SQLOLEDB, SQL Server 2000 +
  8. SQL Server .NET Data Provider (via System.Data.SqlTypes)
  9. OLE DB .NET Data Provider (via System.Data.OleDb)

Note: "User Defined" data types (e.g. ID, TID, EmpID, SysName) are not shown on this diagram.