Data Types
- Last Updated: April 16, 2026
- 4 minute read
- ADO.NET
- Documentation
The following tables list the data types supported by the Sybase data provider:
- Mapping Sybase Data Types maps the Sybase data types to the .NET Framework types.
- Mapping the System.Data.DbTypes to SybaseDbTypes maps the data types the data provider uses if only the System.Data.DbType is specified.
- Mapping .NET Framework Data Types to SybaseDbTypes maps the data types the data provider uses to infer a data type if the provider-specific type and the System.Data.DbType are not provided.
- Data Types Supported With Stream Objects maps the data types the data provider uses when streams are used as inputs to Long data parameters.
Mapping Sybase Data Types to .NET Framework Data Types
The following table lists the data types supported by the Sybase data provider and how they are mapped to the .NET Framework types. You can use the table to infer the data types that are used when a DataSet is filled using a DataAdapter. This table also identifies the accessors to use for accessing the data when a DataReader object is used directly.
In this table, the columns are defined as follows:
- The Sybase Data Type column refers to the native type name.
- The SybaseDbType column refers to the Sybase data provider’s type enumeration. Generally, there is a one to one mapping between the native type and the SybaseDbType.
- The .NET Framework Type column refers to the base data types available in the framework.
- The .NET Framework Typed Accessor column refers the method that must be used to access a column of this type when using a DataReader.
Mapping Sybase Data Types
| Sybase Data Type | SybaseDbType | .NET Framework Type | .NET Framework Typed Accessor |
| BIGINT1 | Binary | Byte[] | GetBytes( ) |
| BINARY | Binary | Byte[] | GetBytes( ) |
| BIT | Bit | Byte[] | GetBytes( ) |
| CHAR | Char | String Char[] |
GetString( ) GetChars( ) |
| DATE2 | Date | DateTime | GetDateTime( ) |
| DATETIME | DateTime | DateTime | GetDateTime( ) |
| DECIMAL | Decimal | Decimal | GetDecimal( ) |
| FLOAT | Float | Double | GetDouble( ) |
| IMAGE | Image | Byte[] | GetBytes( ) |
| INT | Int | Int32 | GetInt32( ) |
| MONEY | Money | Decimal | GetDecimal( ) |
| NUMERIC | Decimal | Decimal | GetDecimal( ) |
| REAL | Real | Single | GetSingle( ) |
| SMALLDATETIME | SmallDateTime | DateTime | GetDateTime( ) |
| SMALLINT | SmallInt | Int16 | GetInt16( ) |
| SMALLMONEY | SmallMoney | Decimal | GetDecimal( ) |
| SYSNAME | SysName | String | GetString( ) |
| TEXT | Text | String Char[] |
GetString( ) GetChars( ) |
| TIME1 | Time | DateTime | GetDateTime( ) |
| TIMESTAMP | Timestamp | Byte[] | GetBytes( ) |
| TINYINT | TinyInt | Byte | GetByte( ) |
| UNICHAR | UniChar | String Char[] |
GetString( ) GetChars( ) |
| UNITEXT1 | UniText | String | GetChars( ) |
| UNIVARCHAR | UniVarChar | String Char[] |
GetString( ) GetChars( ) |
| UNSIGNED INT1 | UnsignedInt | String | GetChars( ) |
| UNSIGNED SMALLINT1 | UnsignedSmallInt | String | GetChars( ) |
| VARBINARY | Varbinary | Byte[] | GetBytes( ) |
| VARCHAR | VarChar | String Char[] |
GetString( ) GetChars( ) |
1
Supported only for Sybase ASE 15 or higher.
2
Supported only for Sybase 12.5.1 or higher.
NOTE FOR USERS OF SYBASE ADAPTIVE SERVER 12.5.1 AND HIGHER: The DataDirect Connect for ADO.NET Sybase data provider supports extended new limits (XNL) for character and binary columns—columns with lengths greater than 255.
Mapping Parameter Data Types
The type of the parameter is specific to each DataDirect Connect for ADO.NET data provider. The Sybase data provider must convert the parameter value to a native format before sending it to the server. The best way for an application to describe a parameter is to use the data provider-specific type enumeration. In generic programming circumstances, the provider-specific type may not be available. In this situation, the data type must be inferred from either the System.Data.DbType or from the .NET Framework type of the parameter’s value.
The Sybase data provider uses the following order when inferring the data type of a parameter:
- The data provider uses the provider-specific data type if it has been specified.
- The data provider infers the data type from the System.Data.DbType if it has been specified, but the data provider-specific type has not been specified.
- The data provider infers the data type from the .NET Framework type if the provider-specific type and the System.Data.DbType have not been specified.
The following table shows the mapping that is used if only the System.Data.DbType is specified.
Mapping the System.Data.DbTypes to SybaseDbTypes
| System.Data.DbType | SybaseDbType Enumerations |
| AnsiString | VarChar |
| AnsiStringFixedLength | Char |
| Binary | VarBinary |
| Boolean | Bit |
| Byte | TinyInt |
| Currency | Money |
| Date | Date |
| DateTime | DateTime |
| Decimal | Decimal |
| Double | Float |
| GUID | Not supported |
| Int16 | SmallInt |
| Int32 | Int |
| Int64 | Decimal BigInt1 UnsignedBigInt1 |
| Object | Not supported |
| Sbyte | SmallInt |
| Single | Real |
| String | NVarChar UniText1 |
| StringFixedLength | NChar |
| Time | Time |
| Uint16 | Int Unsigned SmallInt1 |
| Uint32 | Decimal Unsigned Int1 |
| Uint64 | Decimal UnsignedBigInt1 |
| VarNumeric | Decimal |
1 Supported only on Sybase 15 or higher.
The following table shows the mapping that the data provider uses to infer a data type if neither the provider-specific type or the System.Data.DbType are provided.
Mapping .NET Framework Data Types to SybaseDbTypes
| .NET Framework Type | SybaseDbType |
| Boolean | Bit |
| Byte | TinyInt |
| Byte[] | VarBinary |
| Char | Not supported |
| DateTime | DateTime |
| Decimal | Decimal |
| Double | Float |
| GUID | Not supported |
| Int16 | SmallInt |
| Int32 | Int |
| Int64 | Decimal |
| Object | Not supported |
| Single | Real |
| String | VarChar |
| Uint16 | Int |
| Uint32 | Decimal |
| Uint64 | Decimal |
Data Types Supported With Stream Objects
The following table lists the data types with which the Sybase data provider supports the use of streams as inputs to Long data parameters.
Data Types Supported With Stream Objects
| Sybase Data Type | Stream Type Supported |
| Image | Stream |
| Text | TextReader |
See Using Streams as Input to Long Data Parameters for more information about using streams.