DataType Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public enum class DataType
public enum DataType
type DataType =
Public Enum DataType
- Inheritance
-
DataType
Fields
DT_BOOL | 11 | |
DT_BYREF_BOOL | 16395 | |
DT_BYREF_CY | 16390 | |
DT_BYREF_DATE | 16391 | |
DT_BYREF_DBDATE | 16517 | |
DT_BYREF_DBTIME | 16518 | |
DT_BYREF_DBTIME2 | 16520 | |
DT_BYREF_DBTIMESTAMP | 16519 | |
DT_BYREF_DBTIMESTAMP2 | 16522 | |
DT_BYREF_DBTIMESTAMPOFFSET | 16521 | |
DT_BYREF_DECIMAL | 16398 | |
DT_BYREF_FILETIME | 16448 | |
DT_BYREF_GUID | 16456 | |
DT_BYREF_I1 | 16400 | |
DT_BYREF_I2 | 16386 | |
DT_BYREF_I4 | 16387 | |
DT_BYREF_I8 | 16404 | |
DT_BYREF_NUMERIC | 16515 | |
DT_BYREF_R4 | 16388 | |
DT_BYREF_R8 | 16389 | |
DT_BYREF_UI1 | 16401 | |
DT_BYREF_UI2 | 16402 | |
DT_BYREF_UI4 | 16403 | |
DT_BYREF_UI8 | 16405 | |
DT_BYTES | 128 | |
DT_CY | 6 | |
DT_DATE | 7 | |
DT_DBDATE | 133 | |
DT_DBTIME | 134 | |
DT_DBTIME2 | 145 | |
DT_DBTIMESTAMP | 135 | |
DT_DBTIMESTAMP2 | 304 | |
DT_DBTIMESTAMPOFFSET | 146 | |
DT_DECIMAL | 14 | |
DT_EMPTY | 0 | |
DT_FILETIME | 64 | |
DT_GUID | 72 | |
DT_I1 | 16 | |
DT_I2 | 2 | |
DT_I4 | 3 | |
DT_I8 | 20 | |
DT_IMAGE | 301 | |
DT_NTEXT | 303 | |
DT_NULL | 1 | |
DT_NUMERIC | 131 | |
DT_R4 | 4 | |
DT_R8 | 5 | |
DT_STR | 129 | |
DT_TEXT | 302 | |
DT_UI1 | 17 | |
DT_UI2 | 18 | |
DT_UI4 | 19 | |
DT_UI8 | 21 | |
DT_WSTR | 130 |
Remarks
Data types are divided into reference types and value types. Reference types point to an object of the specified type. Value types contain the actual data, not a pointer to the data.
For those data types that are value types, there are times where you need a pointer to their data, not the data itself. In the member table, the DT_BYREF* members are fields that were created to be pointers to value types.
For more information, see Working with Data Types in the Data Flow.
Note
Boolean values are logical values, not numbers. Although Boolean values may be displayed as numbers in some environments, they are not stored as numbers, and various programming languages represent Boolean values as numeric values differently, as do the .NET Framework methods.
For example, the conversion functions available in Visual Basic convert True
to -1; however, the System.Convert.ToInt32
method in the .NET Framework converts True
to +1. The Integration Services Expression Language converts True
to -1.
To avoid errors or unexpected results, you should not write code that relies on particular numeric values for True
and False
. Wherever possible, you should restrict usage of Boolean variables to the logical values for which they are designed.
For more information about data types, see Integration Services Data Types.