ADO.NET Data Types
This table details the mapping between Vertica data type's and .NET and ADO.NET data types.
.NET Framework Type | ADO.NET DbType | VerticaType | Vertica Data Type | VerticaDataReader getter |
---|---|---|---|---|
Boolean |
Boolean |
Bit |
Boolean |
GetBoolean() |
byte[] |
Binary |
Binary VarBinary LongVarBinary |
Binary VarBinary LongVarBinary |
GetBytes() Note: The limit for LongVarBinary is 32 Million bytes. If you attempt to insert more than the limit during a batch transfer for any one row, then they entire batch fails. Verify the size of the data before attempting to insert a LongVarBinary during a batch. |
Datetime |
DateTime |
Date Time TimeStamp |
Date Time TimeStamp |
GetDateTime() Note: The Time portion of the DateTime object for vertica dates is set to DateTime.MinValue. Previously, VerticaType.DateTime was used for all date/time types. VerticaType.DateTime still exists for backwards compatibility, but now there are more specific VerticaTypes for each type. |
DateTimeOffset |
DateTimeOffset |
TimestampTZ TimeTZ |
TimestampTZ TimeTZ |
GetDateTimeOffset() Note: The Date portion of the DateTime is set to DateTime.MinValue |
Decimal |
Decimal |
Numeric |
Numeric |
GetDecimal() |
Double |
Double |
Double |
Double Precision |
GetDouble() Note: Vertica Double type uses a default precision of 53. |
Int64 |
Int64 |
BigInt |
Integer |
GetInt64() |
TimeSpan |
Object |
13 Interval Types |
13 Interval Types |
GetInterval() Note: There are 13 VerticaType values for the 13 types of intervals. The specific VerticaType used determines the conversion rules that the driver applies. Year/Month intervals represented as 365/30 days |
String |
String |
Varchar LongVarChar |
Varchar LongVarChar |
GetString() |
String |
StringFixedLengt |
Char |
Char |
GetString() |
Object |
Object |
N/A |
N/A |
GetValue() |