![]() |
OCILIB (C and C++ Driver for Oracle)
4.9.0
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
|
OcilibCApiTransactions
Executing SQL statements or PL/SQL blocks with OCILIB follows a simple workflow:
Steps 2 and 3 can be combined into a single call using OCI_ExecuteStmt(), which prepares and executes in one operation.
To determine the number of rows affected by a DML statement, call OCI_GetAffectedRows().
When finished, release the statement and its resources with OCI_StatementFree().
Functions | |
| OCI_SYM_PUBLIC OCI_Statement *OCI_API | OCI_StatementCreate (OCI_Connection *con) |
| Create a statement object and return its handle. | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_StatementFree (OCI_Statement *stmt) |
| Free a statement and all resources associated with it (result sets, bind variables, etc.) | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_Prepare (OCI_Statement *stmt, const otext *sql) |
| Prepare a SQL statement or PL/SQL block. | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_Execute (OCI_Statement *stmt) |
| Execute a prepared SQL statement or PL/SQL block. | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_ExecuteStmt (OCI_Statement *stmt, const otext *sql) |
| Prepare and execute a SQL statement or PL/SQL block in a single call. | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_Parse (OCI_Statement *stmt, const otext *sql) |
| Parse a SQL statement or PL/SQL block without executing it. | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_Describe (OCI_Statement *stmt, const otext *sql) |
| Describe the select list of a SQL SELECT statement without executing it. | |
| OCI_SYM_PUBLIC const otext *OCI_API | OCI_GetSql (OCI_Statement *stmt) |
| Return the last SQL or PL/SQL statement prepared or executed by the statement. | |
| OCI_SYM_PUBLIC const otext *OCI_API | OCI_GetSqlIdentifier (OCI_Statement *stmt) |
| Return the SQL_ID of the statement as assigned by the server. | |
| OCI_SYM_PUBLIC unsigned int OCI_API | OCI_GetSqlErrorPos (OCI_Statement *stmt) |
| Return the character position in the SQL statement where a parsing error occurred. | |
| OCI_SYM_PUBLIC unsigned int OCI_API | OCI_GetAffectedRows (OCI_Statement *stmt) |
| Return the number of rows affected by the SQL statement. | |
| OCI_SYM_PUBLIC unsigned int OCI_API | OCI_GetSQLCommand (OCI_Statement *stmt) |
| Return the Oracle SQL command code for the statement. | |
| OCI_SYM_PUBLIC const otext *OCI_API | OCI_GetSQLVerb (OCI_Statement *stmt) |
| Return the verb of the SQL command held by the statement handle. | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_GetParseBindNames (OCI_Statement *stmt, unsigned int *count, const otext ***names) |
| Return the list of parsed bind names after an OCI_Prepare() or OCI_Parse() call. | |
| OCI_SYM_PUBLIC OCI_Statement *OCI_API OCI_StatementCreate | ( | OCI_Connection * | con | ) |
#include <api.h>
Create a statement object and return its handle.
| con | - Connection handle |
Referenced by ocilib::Statement::Statement().
| OCI_SYM_PUBLIC boolean OCI_API OCI_StatementFree | ( | OCI_Statement * | stmt | ) |
#include <api.h>
Free a statement and all resources associated with it (result sets, bind variables, etc.)
| stmt | - Statement handle |
| OCI_SYM_PUBLIC boolean OCI_API OCI_Prepare | ( | OCI_Statement * | stmt, |
| const otext * | sql | ||
| ) |
#include <api.h>
Prepare a SQL statement or PL/SQL block.
| stmt | - Statement handle |
| sql | - SQL statement or PL/SQL block |
Referenced by ocilib::Statement::Prepare().
| OCI_SYM_PUBLIC boolean OCI_API OCI_Execute | ( | OCI_Statement * | stmt | ) |
#include <api.h>
Execute a prepared SQL statement or PL/SQL block.
| stmt | - Statement handle |
Referenced by ocilib::Statement::ExecutePrepared().
| OCI_SYM_PUBLIC boolean OCI_API OCI_ExecuteStmt | ( | OCI_Statement * | stmt, |
| const otext * | sql | ||
| ) |
#include <api.h>
Prepare and execute a SQL statement or PL/SQL block in a single call.
| stmt | - Statement handle |
| sql | - SQL statement or PL/SQL block |
Referenced by ocilib::Statement::Execute().
| OCI_SYM_PUBLIC boolean OCI_API OCI_Parse | ( | OCI_Statement * | stmt, |
| const otext * | sql | ||
| ) |
#include <api.h>
Parse a SQL statement or PL/SQL block without executing it.
| stmt | - Statement handle |
| sql | - SQL statement or PL/SQL block |
Referenced by ocilib::Statement::Parse().
| OCI_SYM_PUBLIC boolean OCI_API OCI_Describe | ( | OCI_Statement * | stmt, |
| const otext * | sql | ||
| ) |
#include <api.h>
Describe the select list of a SQL SELECT statement without executing it.
| stmt | - Statement handle |
| sql | - SQL SELECT statement |
Referenced by ocilib::Statement::Describe().
| OCI_SYM_PUBLIC const otext *OCI_API OCI_GetSql | ( | OCI_Statement * | stmt | ) |
#include <api.h>
Return the last SQL or PL/SQL statement prepared or executed by the statement.
| stmt | - Statement handle |
Referenced by ocilib::Statement::GetSql().
| OCI_SYM_PUBLIC const otext *OCI_API OCI_GetSqlIdentifier | ( | OCI_Statement * | stmt | ) |
#include <api.h>
Return the SQL_ID of the statement as assigned by the server.
| stmt | - Statement handle |
Referenced by ocilib::Statement::GetSqlIdentifier().
| OCI_SYM_PUBLIC unsigned int OCI_API OCI_GetSqlErrorPos | ( | OCI_Statement * | stmt | ) |
#include <api.h>
Return the character position in the SQL statement where a parsing error occurred.
| stmt | - Statement handle |
Referenced by ocilib::Statement::GetSqlErrorPos().
| OCI_SYM_PUBLIC unsigned int OCI_API OCI_GetAffectedRows | ( | OCI_Statement * | stmt | ) |
#include <api.h>
Return the number of rows affected by the SQL statement.
| stmt | - Statement handle |
Referenced by ocilib::Statement::GetAffectedRows().
| OCI_SYM_PUBLIC unsigned int OCI_API OCI_GetSQLCommand | ( | OCI_Statement * | stmt | ) |
#include <api.h>
Return the Oracle SQL command code for the statement.
| stmt | - Statement handle |
Referenced by ocilib::Statement::GetSQLCommand().
| OCI_SYM_PUBLIC const otext *OCI_API OCI_GetSQLVerb | ( | OCI_Statement * | stmt | ) |
#include <api.h>
Return the verb of the SQL command held by the statement handle.
| stmt | - Statement handle |
Referenced by ocilib::Statement::GetSQLVerb().
| OCI_SYM_PUBLIC boolean OCI_API OCI_GetParseBindNames | ( | OCI_Statement * | stmt, |
| unsigned int * | count, | ||
| const otext *** | names | ||
| ) |
#include <api.h>
Return the list of parsed bind names after an OCI_Prepare() or OCI_Parse() call.
| stmt | - Statement handle |
| count | - Pointer to receive the bind count |
| names | - Pointer to receive the array of bind names |
count or names are NULL). Referenced by ocilib::Statement::GetParseBindNames().