O'Reilly logo

Essential ADO.NET by Bob Beauchemin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A.4. Mapping of ODBC Types

Table A-4 maps the members of the OdbcType enumeration to ODBC data types and the .NET type system.

Table A-4. The OdbcType enumeration
Member Name Description
BigInt Exact numeric value with precision 19 (if signed) or 20 (if unsigned) and scale 0 (signed: –2[63] <= n <= 2[63] – 1, unsigned: 0 <= n <= 2[64] – 1) (SQL_BIGINT). This maps to Int64.
Binary A stream of binary data (SQL_BINARY). This maps to an Array of type Byte.
Bit Single bit binary data (SQL_BIT). This maps to Boolean.
Char A fixed-length character string (SQL_CHAR). This maps to String.
DateTime Date data in the format yyyymmdd (SQL_TYPE_TIMESTAMP). This maps to DateTime.
Decimal Signed, exact, numeric value with a precision of at least p and scale s, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required