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 Call Interface

V2.1.0Enterprise Edition

  • What's New
  • Product Introduction
  • Install OBCI
  • Data types
  • Basic development procedure
  • Development example
  • Load balancing
  • Reference Functions
    • Connect, authorize, and initialize functions
    • Handle and descriptor functions
    • Bind, define, and describe functions
    • Statement functions
    • LOB functions
    • Transaction functions
    • Miscellaneous functions
    • String functions
    • Date and Datetime functions
    • Interval functions
    • Number functions
    • Terminate functions
    • Describe functions
    • Locale functions
    • Define functions
  • Full-link Diagnostic Trace
    • Full-link Diagnostic Trace
    • Full-link Diagnostic Trace of OBCI
    • Sample code

Download PDF

What's New Product Introduction Install OBCI Data types Basic development procedure Development example Load balancing Connect, authorize, and initialize functions Handle and descriptor functions Bind, define, and describe functions Statement functions LOB functions Transaction functions Miscellaneous functions String functions Date and Datetime functions Interval functions Number functions Terminate functions Describe functions Locale functions Define functions Full-link Diagnostic Trace Full-link Diagnostic Trace of OBCI Sample code
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 Call Interface
  3. V2.1.0
iconOceanBase Call Interface
V 2.1.0Enterprise Edition

Bind, define, and describe functions

Last Updated:2023-06-29 06:42:20  Updated
share
What is on this page
OCIBindArrayOfStruct
OCIBindByName
OCIBindByPos
OCIDefineArrayOfStruct
OCIDefineByPos

folded

share

OCIBindArrayOfStruct

Description : You can call this function to set the skip parameters for a static array bind.

Function prototype :

sword OCIBindArrayOfStruct (
OCIBind * bindp,
OCIError *errhp,
ub4 pvskip,
ub4 indskip,
ub4 alskip,
ub4 rcskip );

Parameters :

Parameter Description
bindp (IN) The handle to a bind structure.
errhp(IN/OUT) An error handle.
pvskip(IN) The size of the interval between two values. When multiple rows are returned at a time, OBCI backfills the value for each row based on this size.
indskip(IN) The size of the interval between two null value indicators.
alskip (IN) The size of the interval between two return value length indicators.
rcskip(IN) The number of bytes skipped during multi-row binding.

Return value : OCI_SUCCESS if succeeded, or OCI_ERROR if failed.

OCIBindByName

Description : You can call this function to bind parameters in an SQL statement by parameter name.

Function prototype :

sword OCIBindByName ( 
OCIStmt *stmtp,
OCIBind **bindpp,
OCIError *errhp,
CONST text *placeholder,
sb4 placeh_len,
dvoid *valuep,
sb4 value_sz,232
ub2 dty,
dvoid *indp,
ub2 *alenp,
ub2 *rcodep,
ub4 maxarr_len,
ub4 *curelep,
ub4 mode );

Parameters :

Parameter Description
stmtp(IN) The handle to the statement being processed.
bindp(OUT) The handle to a bind structure.
errhp(IN/OUT) An error handle.
placeholder(IN) The name of the parameter that is bound.
placeh_len(IN) The length of the parameter name.
valuep(IN) The pointer to a parameter value buffer.
value_sz(IN) The size of a single value of the parameter type.
dty(IN) The data type of a parameter.
indp(IN) A reserved parameter. Set this parameter to NULL.
alenp(IN) A reserved parameter. Set this parameter to NULL.
rcodep(IN) A reserved parameter. Set this parameter to NULL.
maxarr_len(IN) A reserved parameter.
curelep(IN) A reserved parameter. Set this parameter to NULL.
mode(IN) The mode of binding. OBCI V1.2.0 only supports OCI_DEFAULT, which is the default mode.

Return value : OCI_SUCCESS if succeeded, or OCI_ERROR if failed.

OCIBindByPos

Description : You can call this function to bind a parameter based on its position in an SQL statement.

Function prototype :

sword OCIBindByPos ( 
OCIStmt *stmtp,
OCIBind **bindp,
OCIError *errhp,
ub4 position,
dvoid *valuep,
sb4 value_sz,
ub2 dty,
dvoid *indp,
ub2 *alenp, 
ub2 *rcodep,
ub4 maxarr_len,
ub4 *curelep,233
ub4 mode );

Parameters :

Parameter Description
stmtp(IN) The handle to the statement being processed.
bindp(OUT) The handle to a bind structure.
errhp(IN/OUT) An error handle.
position(IN) The position of the parameter in an SQL statement. The value starts from 1.
valuep(IN) The pointer to a parameter value buffer.
value_sz(IN) The size of a single value of the parameter type.
dty(IN) The data type of a parameter.
indp(IN) A reserved parameter. Set this parameter to NULL.
alenp(IN) A reserved parameter. Set this parameter to NULL.
rcodep(IN) A reserved parameter. Set this parameter to NULL.
maxarr_len(IN) A reserved parameter.
curelep(IN) A reserved parameter. Set this parameter to NULL.
mode(IN) The mode of binding. OBCI V1.2.0 only supports OCI_DEFAULT, which is the default mode.

Return value : OCI_SUCCESS if succeeded, or OCI_ERROR if failed.

OCIDefineArrayOfStruct

Description : You can call this function to specify additional attributes necessary for binding an array of structures, such as columns.

Function prototype :

sword OCIDefineArrayOfStruct ( 
OCIDefine *defnp,
OCIError *errhp,
ub4 pvskip,
ub4 indskip,
ub4 rlskip,
ub4 rcskip );

Parameters :

Parameter Description
defnp (IN) The handle to a bind structure.
errhp(IN/OUT) An error handle.
pvskip(IN) The size of the interval between two values. When multiple rows are returned at a time, OBCI backfills the value for each row based on this size.
indskip(IN) The size of the interval between two null value indicators.
rlskip (IN) The size of the interval between two return value length indicators.
rcskip(IN) The number of bytes skipped during multi-row binding.

Return value : OCI_SUCCESS if succeeded, or OCI_ERROR if failed.

OCIDefineByPos

Description : You can call this function to bind the value range of each column in a return value set by the position of the value.

Function prototype :

sword OCIDefineByPos ( 
OCIStmt *stmtp,
OCIDefine **defnpp,
OCIError *errhp,
ub4 position,
dvoid *valuep,
sb4 value_sz,
ub2 dty,
dvoid *indp,
ub2 *rlenp,
ub2 *rcodep,
ub4 mode );

Parameters :

Parameter Description
stmtp(IN) The handle to the statement being processed.
defnp(OUT) The output pointer to a bind structure. You can use this parameter to call the OCIDefineArrayOfStruct() function and specify the interval between two values in the column.
errhp(IN/OUT) An error handle.
position(IN) The position of the parameter in an SQL statement. The value starts from 1.
valuep(IN) The pointer to a parameter value buffer.
value_sz(IN) The size of a single value of the parameter type.
dty(IN) The data type of a parameter.
indp(IN) The pointer to an indicator buffer. If a NULL value exists in the result set, OBCI backfills the buffer and sets its position to -1, or 0 in other cases. If the indicator buffer has not been set during the binding, but a NULL value exists in the result, the function returns an OCI_ERROR error.
rlenp(IN) The pointer to the indicator buffer of the length of the return value. If the return value is not truncated, the value in the buffer is the actual length of the return value. If the return value is truncated when it is fetched, the value in the buffer is the length of this value before truncation. If the return value is null, the value in the buffer is set to 0.
rcodep(IN) A reserved parameter.
mode(IN) The mode of binding. OBCI V1.2.0 only supports OCI_DEFAULT, which is the default mode.

Return value : OCI_SUCCESS if succeeded, or OCI_ERROR if failed.

Previous topic

Handle and descriptor functions
Last

Next topic

Statement functions
Next
What is on this page
OCIBindArrayOfStruct
OCIBindByName
OCIBindByPos
OCIDefineArrayOfStruct
OCIDefineByPos