OceanBase Connector/NET is a driver developed in C# and running on the .NET platform. It provides applications with connectivity to OceanBase Database and supports the following modes:
- Oracle mode: Supports Oracle-compatible APIs (such as
OracleConnection,OracleCommand,OracleDataReader, etc.). - MySQL mode: The usage is consistent with MySqlConnector, and the connection method is the same as that of MySQL Connector.
Cross-platform support
OceanBase Connector/NET is cross-platform and can run on Windows, Linux, and macOS. It enables enterprise applications to uniformly access OceanBase Database across various deployment environments.
Main modules and support
This topic primarily introduces features under Oracle mode. MySQL mode uses the same methods as MySqlConnector and is not covered here.
Module |
Supported Content |
|---|---|
| OracleTransaction | Commit (Commit/CommitAsync) and rollback (Rollback/RollbackAsync); named savepoints; isolation levels ReadCommitted, RepeatableRead, and Serializable (ReadUncommitted and Snapshot are not supported). |
| OracleCommand | CommandType.Text, CommandType.StoredProcedure; ExecuteNonQuery, ExecuteScalar, ExecuteReader (including asynchronous); Prepare/PrepareAsync; OUT/InputOutput/ReturnValue parameters for stored procedures; REF CURSOR result sets; ArrayBinding for batch DML (requiresUseArrayBinding=trueandArrayBindCount);CommandTimeout、Cancel;LastInsertedId. |
| OracleDataReader | Read/ReadAsync, NextResult/NextResultAsync; GetValue, GetString, GetInt16/32/64, etc.; GetOracleBlob, GetOracleClob, GetOracleTimeStamp, and other Oracle types; multi-result set and REF CURSOR traversal; RowId reading. |
| OracleDataAdapter | You can use the SelectCommand to query data and populate a DataSet or DataTable. You can also configure InsertCommand, UpdateCommand, and DeleteCommand for data updates. |
| OracleConnection | Open/OpenAsync, Close/CloseAsync; BeginTransaction, CreateCommand, ChangeDatabase, Ping; connection pooling, SSL; EnlistTransaction (distributed transactions);AutoCommitRuntime properties (V1.3.1, aligned with ODP.NET). In Oracle-compatible mode, a database (schema) must be specified. Current limitations: GetSchema is not supported; CreateBatch (batch processing) is not supported. |
| OracleParameter | Named parameters (@name, :name); Direction: Input, Output, InputOutput,ReturnValue; OracleDbType and DbType; UDT (OracleDbType.Object / OracleDbType.Array) andUdtTypeName. |
| UDT | OBJECT / VARRAY custom type mappings (IOracleCustomType/ Factory) and NULL Sentinel (IOracleNullable)、DeriveParametersMetadata derivation. |
| OracleDataSource | PassedOracleDataSourceorOracleClientFactory.CreateDataSource()Create a data source and obtain a connection. |
| OracleCommandBuilder | SupportedDeriveParametersStatic methods automatically derive parameter information from stored procedures. |
| OracleClientFactory | ImplementationDbProviderFactory, you can createOracleConnection、OracleCommand、OracleCommandBuilder、OracleDataAdapter、OracleDataSourceand other objects. |
For detailed interface lists and capability boundaries, see Overview of common interfaces.
Unsupported scenarios
- GetSchema (Calling this method on an OracleConnection throws a NotSupportedException)
- CreateBatch (Batch processing)
