OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Connector/NET

V1.0.0

  • What Is OceanBase Connector/NET
    • Introduction
  • Install and Connect
    • Installation process
    • Test the connection
    • Reference a NuGet package
  • User Guide
    • Quick Start
      • Complete example
    • Connection Strings and Data Source
      • Connection strings
    • Data Types
      • Overview of data types
    • Command and Parameter
      • Overview
    • Result Set
      • Supported result set types
  • Reference Information
    • Common Interfaces
      • Overview of commonly used interfaces
  • Version Release Records
    • OceanBase Connector/NET V1.0.0

Download PDF

Introduction Installation process Test the connection Reference a NuGet package Complete example Connection strings Overview of data types Overview Supported result set types Overview of commonly used interfaces OceanBase Connector/NET V1.0.0
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogLive DemosTraining & Certification
Company
About OceanBaseTrust CenterLegalPartnerContact Us
Follow Us

© OceanBase 2026. All rights reserved

Cloud Service AgreementPrivacy PolicySecurity
Contact Us
Document Feedback
  1. Documentation Center
  2. OceanBase Connector/NET
  3. V1.0.0
iconOceanBase Connector/NET
V 1.0.0
  • V 1.1.0
  • V 1.0.0

Overview of data types

Last Updated:2026-04-10 07:38:32  Updated
share
What is on this page
Mode description
Protocol-layer ColumnType comparison (MySQL protocol)
Extended protocol types in Oracle mode
Supported OracleDbType types (Oracle mode)
Common parameter type mapping (Oracle mode)
Type description in MySQL mode

folded

share

OceanBase Connector/NET interacts with the database based on the MySQL protocol and extends Oracle-specific types in Oracle mode.

Mode description

  • Oracle mode: Provides OracleDbType and Oracle-compatible types (such as Varchar2, TimeStampTZ, and RefCursor).
  • MySQL mode: Follows the MySQL protocol type system and is used in the same way as MySqlConnector.

Note

In the following text, ColumnType refers to the FieldType in the column definition of the MySQL protocol. In Oracle mode, some types are mapped to extended protocol type values (such as 200~211) of OceanBase.

Protocol-layer ColumnType comparison (MySQL protocol)

Protocol value MySQL FieldType Oracle mode type MySQL mode description
1 TINYINT TINYINT Integer (1 byte)
2 SMALLINT SMALLINT Integer (2 bytes)
3 INTEGER NUMBER INT
4 FLOAT BINARY_FLOAT FLOAT
5 DOUBLE BINARY_DOUBLE DOUBLE
8 BIGINT BIGINT BIGINT
10 DATE DATE DATE
11 TIME - TIME
12 DATETIME DATETIME DATETIME
15 VARCHAR VARCHAR VARCHAR
16 BIT BIT BIT
245 JSON - JSON
246 NEWDECIMAL OBDECIMAL DECIMAL
249 TINYBLOB - TINYBLOB
250 MEDIUMBLOB - MEDIUMBLOB
251 LONGBLOB - LONGBLOB
252 BLOB - BLOB
253 VARSTRING VARCHAR2 VAR_STRING
254 STRING STRING CHAR/BINARY
255 GEOMETRY - GEOMETRY

Extended protocol types in Oracle mode

Protocol value Oracle extended type Description
200 TIMESTAMP_TZ TIMESTAMP WITH TIME ZONE
201 TIMESTAMP_LTZ TIMESTAMP WITH LOCAL TIME ZONE
202 TIMESTAMP_NANO High-precision timestamp
203 RAW RAW binary type
204 INTERVALYM INTERVAL YEAR TO MONTH
205 INTERVALDS INTERVAL DAY TO SECOND
206 NUMBER_FLOAT NUMBER_FLOAT (protocol Unknown)
207 NVARCHAR2 NVARCHAR2
208 NCHAR NCHAR
209 ROWID UROWID/ROWID
210 ORACLE_BLOB Oracle BLOB
211 ORACLE_CLOB Oracle CLOB

Supported OracleDbType types (Oracle mode)

OracleDbType Corresponding Oracle type Support
BinaryFloat BINARY_FLOAT Supported
BinaryDouble BINARY_DOUBLE Supported
Blob BLOB Supported
Boolean BOOLEAN Supported
Char CHAR Supported
Clob CLOB Supported
Date DATE Supported
Decimal NUMBER Supported
Double FLOAT(8-byte) Supported
Int16 / Int32 / Int64 INTEGER Supported
IntervalDS INTERVAL DAY TO SECOND Supported
IntervalYM INTERVAL YEAR TO MONTH Supported
NChar NCHAR Supported
NVarchar2 NVARCHAR2 Supported
Raw RAW Supported
RefCursor REF CURSOR Supported (in stored procedure scenarios)
Single FLOAT(4-byte) Supported
TimeStamp TIMESTAMP Supported
TimeStampLTZ TIMESTAMP WITH LOCAL TIME ZONE Supported
TimeStampTZ TIMESTAMP WITH TIME ZONE Supported
Varchar2 VARCHAR2 Supported

Common parameter type mapping (Oracle mode)

.NET Type DbType OracleDbType (default)
bool Boolean Boolean
byte Byte Byte
byte[] Binary Raw
short Int16 Int16
int Int32 Int32
long Int64 Int64
float Single Single
double Double Double
decimal Decimal Decimal
string String Varchar2
DateTime DateTime TimeStamp
DateTimeOffset DateTimeOffset TimeStampTZ
TimeSpan Object IntervalDS
Guid Guid Blob

Type description in MySQL mode

In MySQL mode, the behavior of types is consistent with MySqlConnector. The following points are highlighted:

  • Numeric, string, and date/time types are parsed based on the MySQL protocol field types.
  • Types such as JSON, BLOB, and GEOMETRY are processed based on MySQL semantics.
  • Parameter binding does not use OracleDbType. Instead, use .NET types or the generic DbType.

Notice

The parameter binding systems in Oracle mode and MySQL mode are different. In Oracle mode, we recommend that you explicitly set OracleDbType. In MySQL mode, we recommend that you follow the parameter rules of MySqlConnector.

Previous topic

Connection strings
Last

Next topic

Overview
Next
What is on this page
Mode description
Protocol-layer ColumnType comparison (MySQL protocol)
Extended protocol types in Oracle mode
Supported OracleDbType types (Oracle mode)
Common parameter type mapping (Oracle mode)
Type description in MySQL mode