Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI SQL Client ODBC

Data types

  • Last UpdatedJan 04, 2023
  • 1 minute read

PI SQL Client ODBC supports the following data types:

Name

Data Type Indicator

AnsiString

SQL_C_CHAR

AnsiStringCs

SQL_C_CHAR

Boolean

SQL_C_BIT

DateTime

SQL_C_TYPE_TIMESTAMP

Double

SQL_C_DOUBLE

Guid

SQL_C_GUID

Note: If Guid as String is used in the DSN or connection string, this is SQl_C_WCHAR instead.

Int8

SQL_C_TINYINT

Int16

SQL_C_SHORT

Int32

SQL_C_LONG

Int64

SQL_C_BIGINT

Single

SQL_C_FLOAT

String

SQL_C_WCHAR

StringCs

SQL_C_WCHAR

TimeSpan

SQL_C_TIME

UInt8

SQL_C_UTINYINT

UInt16

SQL_C_USHORT

UInt32

SQL_C_ULONG

UInt64

SQL_C_UBIGINT

Variant

SQL_SS_VARIANT

Note: If Variant as String is used in the DSN or connection string, this is SQL_C_WCHAR instead.

Note: PI SQL Client ODBC supports columns that have DBTYPE_VARIANT as the underlying OLE DB data type. PI SQL Client ODBC uses the same approach as Microsoft ODBC drivers and the underlying SQL Server data type sql_variant.

Applications developed in .NET using namespace System.Data.ODBC automatically recognize an Object column. You can use the GetType method to recognize the contained subtype.

For native code applications, details can be found in the technet article, Mapping Data Types (ODBC).

Applications that use binding usually bind the column to a string data type.

TitleResults for “How to create a CRG?”Also Available in