ADO.NET Data Types

This table details the mapping between Vertica data types 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()

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()

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()

The Date portion of the DateTime is set to DateTime.MinValue

Decimal

Decimal

Numeric

Numeric

GetDecimal()

Double

Double

Double

Double

Precision

GetDouble()

Vertica Double type uses a default precision of 53.

Int64

Int64

BigInt

Integer

GetInt64()

TimeSpan

Object

13 Interval Types

13 Interval Types

GetInterval()

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()

Guid Guid UUID (see note below) UUID

GetGuid()

Object

Object

N/A

N/A

GetValue()

UUID Backwards Compatibility

Vertica version 9.0.0 introduced the UUID data type, including JDBC support for UUIDs. The Vertica ADO.NET, ODBC, and OLE DB clients added full support for UUIDs in version 9.0.1. Vertica maintains backwards compatibility with the earlier client driver versions that do not support the UUID data type (see Client Driver and Server Version Compatibility for the versions of the client drivers that Vertica supports). When one of these older clients queries tables with UUID columns in them, Vertica automatically translates the native UUID values to CHAR values. Also, when an older client inserts data into a UUID column, Vertica automatically converts the CHAR value sent by the client into a native UUID value. Vertica also reports the data type of these columns as CHAR when an older client queries a UUID column's metadata.