Condividi tramite


Enumerazione DataType

Indica il tipo di dati delle colonne nei componenti del flusso di dati e nel buffer del flusso di dati.

Spazio dei nomi  Microsoft.SqlServer.Dts.Runtime.Wrapper
Assembly:  Microsoft.SqlServer.DTSRuntimeWrap (in Microsoft.SqlServer.DTSRuntimeWrap.dll)

Sintassi

'Dichiarazione
Public Enumeration DataType
'Utilizzo
Dim instance As DataType
public enum DataType
public enum class DataType
type DataType
public enum DataType

Membri

Nome membro Descrizione
DT_EMPTY Tipo di dati che non dispone di un valore. Il valore numerico è 0.
DT_NULL Tipo di dati con valore NULL. Il valore numerico è 1.
DT_I2 Intero con segno a 2 byte. Il valore numerico è 2.
DT_I4 Intero con segno a 4 byte. Il valore numerico è 3.
DT_R4 Valore a virgola mobile con precisione singola. Il valore numerico è 4.
DT_R8 Valore a virgola mobile con precisione doppia. Il valore numerico è 5.
DT_CY Valore di valuta. Questo tipo di dati è un valore a 8 byte con scala 4 e precisione massima 19. Il valore numerico è 6.
DT_DATE Struttura di data che include anno, mese, giorno e ora.

The DT_DATE data type is implemented using an 8-byte floating-point number. Days are represented by whole number increments, starting with 30 December 1899, and midnight as time zero. Hour values are expressed as the absolute value of the fractional part of the number. This means that DT_DATE can represent minutes, seconds, and even milliseconds as well. However, floating point value cannot represent all real values; therefore, there are limits on the range of dates that can be presented in DT_DATE.

On the other hand, DT_DBTIMESTAMP is represented by a structure that has individual fields for year, month, day, hours, minutes, seconds, and milliseconds, and this data type has no limits on ranges of the dates it can present.

The numeric value is 7.

DT_BOOL Valore booleano. Il valore numerico è 11.
DT_DECIMAL Valore numerico esatto con scala e precisione fisse. Questo tipo di dati è un valore a 12 byte, con segno a parte, scala da 0 a 28 e precisione massima 29. Il valore numerico è 14.
DT_I1 Intero con segno a 1 byte. Il valore numerico è 16.
DT_UI1 Intero senza segno a 1 byte. Il valore numerico è 17.
DT_UI2 Intero senza segno a 2 byte. Il valore numerico è 18.
DT_UI4 Intero senza segno a 4 byte. Il valore numerico è 19.
DT_I8 Intero con segno a 8 byte. Il valore numerico è 20.
DT_UI8 Intero senza segno a 8 byte. Il valore numerico è 21.
DT_FILETIME Valore a 64 bit che rappresenta il numero di intervalli di 100 nanosecondi trascorsi dal 1° gennaio 1601. Il valore numerico è 64.
DT_GUID Identificatore univoco globale (GUID, Globally Unique Identifier). Il valore numerico è 72.
DT_BYTES Valore di dati binari. La lunghezza è variabile, fino a un massimo di 8.000 byte. Il valore numerico è 128.
DT_STR Stringa di caratteri ANSI/MBCS con terminazione Null. Il valore numerico è 129.
DT_WSTR Stringa di caratteri Unicode con terminazione Null. Il valore numerico è 130.
DT_NUMERIC Valore numerico esatto con scala e precisione fisse. Questo tipo di dati è un valore a 16 byte, con segno a parte, scala da 0 a 38 e precisione massima 38. Il valore numerico è 131.
DT_DBDATE Struttura di data che include anno, mese e giorno. Il valore numerico è 133.
DT_DBTIME Struttura di ora che include ora, minuto e secondo. Il valore numerico è 134.
DT_DBTIMESTAMP Struttura di timestamp che include anno, mese, giorno, ora, minuti, secondi e secondi frazionari. I secondi frazionari hanno una scala massima di 3 cifre. Il valore numerico è 135.
DT_DBTIME2 Struttura di ora che include ora, minuti, secondi e secondi frazionari. I secondi frazionari hanno una scala massima di 7 cifre. Il valore numerico è 145.
DT_DBTIMESTAMPOFFSET Struttura di timestamp che include anno, mese, giorno, ora, minuti, secondi e secondi frazionari. I secondi frazionari hanno una scala massima di 7 cifre.

The DT_DBTIMESTAMPOFFSET data type also has a time zone offset. This offset specifies the number of hours and minutes that the time is offset from the Coordinated Universal Time (UTC). The time zone offset is used by the system to obtain the local time.

The numeric value is 146.

DT_IMAGE Valore binario con dimensioni massime di 231-1 (2.147.483.647) byte. Il valore numerico è 301.
DT_TEXT Stringa di caratteri ANSI/MBCS con lunghezza massima di 231–1 (2.147.483.647) caratteri. Il valore numerico è 302.
DT_NTEXT Stringa di caratteri Unicode con lunghezza massima di 2^30–1 (1.073.741.823) caratteri. Il valore numerico è 303.
DT_DBTIMESTAMP2 Struttura di timestamp che include anno, mese, giorno, ora, minuti, secondi e secondi frazionari. I secondi frazionari hanno una scala massima di 7 cifre. Il valore numerico è 304.
DT_BYREF_I2 Puntatore a un intero con segno a 2 byte. Il valore numerico è 16386.
DT_BYREF_I4 Puntatore a un intero con segno a 4 byte. Il valore numerico è 16387.
DT_BYREF_R4 Puntatore a un valore a virgola mobile con precisione singola. Il valore numerico è 16388.
DT_BYREF_R8 Puntatore a un valore a virgola mobile con precisione doppia. Il valore numerico è 16389.
DT_BYREF_CY Puntatore a un valore di valuta. Questo tipo di dati è un valore a 8 byte con scala 4 e precisione massima 19. Il valore numerico è 16390.
DT_BYREF_DATE Puntatore a una struttura di data che include anno, mese, giorno e ora. Il valore numerico è 16391.
DT_BYREF_BOOL Puntatore a un valore booleano. Il valore numerico è 16395.
DT_BYREF_DECIMAL Puntatore a un valore numerico esatto con scala e precisione fisse. Questo tipo di dati è un valore a 12 byte, con segno a parte, scala da 0 a 28 e precisione massima 29. Il valore numerico è 16398.
DT_BYREF_I1 Puntatore a un intero con segno a 1 byte. Il valore numerico è 16400.
DT_BYREF_UI1 Puntatore a un intero senza segno a 1 byte. Il valore numerico è 16401.
DT_BYREF_UI2 Puntatore a un intero senza segno a 2 byte. Il valore numerico è 16402.
DT_BYREF_UI4 Puntatore a un intero senza segno a 4 byte. Il valore numerico è 16403.
DT_BYREF_I8 Puntatore a un intero con segno a 8 byte. Il valore numerico è 16404.
DT_BYREF_UI8 Puntatore a un intero senza segno a 8 byte. Il valore numerico è 16405.
DT_BYREF_FILETIME Puntatore a un valore a 64 bit che rappresenta il numero di intervalli di 100 nanosecondi trascorsi dal 1° gennaio 1601. Il valore numerico è 16448.
DT_BYREF_GUID Puntatore a un GUID. Il valore numerico è 16456.
DT_BYREF_NUMERIC Puntatore a un valore numerico esatto con scala e precisione fisse. Questo tipo di dati è un valore a 16 byte, con segno a parte, scala da 0 a 38 e precisione massima 38. Il valore numerico è 16515.
DT_BYREF_DBDATE Puntatore a una struttura di data che include anno, mese e giorno. Il valore numerico è 16517.
DT_BYREF_DBTIME Puntatore a una struttura di ora che include ora, minuti e secondi. Il valore numerico è 16518.
DT_BYREF_DBTIMESTAMP Puntatore a una struttura di timestamp che include anno, mese, giorno, ora, minuti, secondi e secondi frazionari. I secondi frazionari hanno una scala massima di 3 cifre. Il valore numerico è 16519.
DT_BYREF_DBTIME2 Puntatore a una struttura di ora che include ora, minuti, secondi e secondi frazionari. I secondi frazionari hanno una scala massima di 7 cifre. Il valore numerico è 16520.
DT_BYREF_DBTIMESTAMPOFFSET Puntatore a una struttura di timestamp che include anno, mese, giorno, ora, minuti, secondi e secondi frazionari. I secondi frazionari hanno una scala massima di 7 cifre.

The DT_DBTIMESTAMPOFFSET data type also has a time zone offset. This offset specifies the number of hours and minutes that the time is offset from the Coordinated Universal Time (UTC). The time zone offset is used by the system to obtain the local time.

The numeric value is 16521.

DT_BYREF_DBTIMESTAMP2 Puntatore a una struttura di timestamp che include anno, mese, giorno, ora, minuti, secondi e secondi frazionari. I secondi frazionari hanno una scala massima di 7 cifre. Il valore numerico è 16522.

Osservazioni

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 Utilizzo di tipi di dati nel flusso di dati.

Nota

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 Tipi di dati di Integration Services.