|
OCILIB (C and C++ Driver for Oracle)
4.0.0
|
Connecting to a database server is done with one call to OCI_ConnectionCreate().
OCI_ConnectionFree() closes the established connection.
Connection properties are accessible through a set of functions
Functions | |
| OCI_EXPORT OCI_Connection *OCI_API | OCI_ConnectionCreate (const otext *db, const otext *user, const otext *pwd, unsigned int mode) |
| Create a physical connection to an Oracle database server. More... | |
| OCI_EXPORT boolean OCI_API | OCI_ConnectionFree (OCI_Connection *con) |
| Close a physical connection to an Oracle database server. More... | |
| OCI_EXPORT boolean OCI_API | OCI_IsConnected (OCI_Connection *con) |
| Returns TRUE is the given connection is still connected otherwise FALSE. More... | |
| OCI_EXPORT void *OCI_API | OCI_GetUserData (OCI_Connection *con) |
| Return the pointer to user data previously associated with the connection. More... | |
| OCI_EXPORT boolean OCI_API | OCI_SetUserData (OCI_Connection *con, void *data) |
| Associate a pointer to user data to the given connection. More... | |
| OCI_EXPORT boolean OCI_API | OCI_SetSessionTag (OCI_Connection *con, const otext *tag) |
| Associate a tag to the given connection/session. More... | |
| OCI_EXPORT const otext *OCI_API | OCI_GetSessionTag (OCI_Connection *con) |
| Return the tag associated the given connection. More... | |
| OCI_EXPORT const otext *OCI_API | OCI_GetDatabase (OCI_Connection *con) |
| Return the name of the connected database/service name. More... | |
| OCI_EXPORT const otext *OCI_API | OCI_GetUserName (OCI_Connection *con) |
| Return the current logged user name. More... | |
| OCI_EXPORT const otext *OCI_API | OCI_GetPassword (OCI_Connection *con) |
| Return the current logged user password. More... | |
| OCI_EXPORT boolean OCI_API | OCI_SetPassword (OCI_Connection *con, const otext *password) |
| Change the password of the logged user. More... | |
| OCI_EXPORT boolean OCI_API | OCI_SetUserPassword (const otext *db, const otext *user, const otext *pwd, const otext *new_pwd) |
| Change the password of the given user on the given database. More... | |
| OCI_EXPORT unsigned int OCI_API | OCI_GetSessionMode (OCI_Connection *con) |
| Return the current session mode. More... | |
| OCI_EXPORT const otext *OCI_API | OCI_GetVersionServer (OCI_Connection *con) |
| Return the connected database server version. More... | |
| OCI_EXPORT unsigned int OCI_API | OCI_GetServerMajorVersion (OCI_Connection *con) |
| Return the major version number of the connected database server. More... | |
| OCI_EXPORT unsigned int OCI_API | OCI_GetServerMinorVersion (OCI_Connection *con) |
| Return the minor version number of the connected database server. More... | |
| OCI_EXPORT unsigned int OCI_API | OCI_GetServerRevisionVersion (OCI_Connection *con) |
| Return the revision version number of the connected database server. More... | |
| OCI_EXPORT boolean OCI_API | OCI_SetDefaultFormatDate (OCI_Connection *con, const otext *format) |
| Set the date format for implicit string / date conversions. More... | |
| OCI_EXPORT const otext *OCI_API | OCI_GetDefaultFormatDate (OCI_Connection *con) |
| Return the current date format for implicit string / date conversions. More... | |
| OCI_EXPORT boolean OCI_API | OCI_SetDefaultFormatNumeric (OCI_Connection *con, const otext *format) |
| Set the numeric format for implicit string / numeric conversions. More... | |
| OCI_EXPORT const otext *OCI_API | OCI_GetDefaultFormatNumeric (OCI_Connection *con) |
| Return the current numeric format for implicit string / numeric conversions. More... | |
| OCI_EXPORT OCI_Transaction *OCI_API | OCI_GetTransaction (OCI_Connection *con) |
| Return the current transaction of the connection. More... | |
| OCI_EXPORT boolean OCI_API | OCI_SetTransaction (OCI_Connection *con, OCI_Transaction *trans) |
| Set a transaction to a connection. More... | |
| OCI_EXPORT unsigned int OCI_API | OCI_GetVersionConnection (OCI_Connection *con) |
| Return the highest Oracle version is supported by the connection. More... | |
| OCI_EXPORT boolean OCI_API | OCI_SetTrace (OCI_Connection *con, unsigned int trace, const otext *value) |
| Set tracing information to the session of the given connection. More... | |
| OCI_EXPORT const otext *OCI_API | OCI_GetTrace (OCI_Connection *con, unsigned int trace) |
| Get the current trace for the trace type from the given connection. More... | |
| OCI_EXPORT boolean OCI_API | OCI_Ping (OCI_Connection *con) |
| Makes a round trip call to the server to confirm that the connection and the server are active. More... | |
| OCI_EXPORT const otext *OCI_API | OCI_GetDBName (OCI_Connection *con) |
| Return the Oracle server database name of the connected database/service name. More... | |
| OCI_EXPORT const otext *OCI_API | OCI_GetInstanceName (OCI_Connection *con) |
| Return the Oracle server Instance name of the connected database/service name. More... | |
| OCI_EXPORT const otext *OCI_API | OCI_GetServiceName (OCI_Connection *con) |
| Return the Oracle server service name of the connected database/service name. More... | |
| OCI_EXPORT const otext *OCI_API | OCI_GetServerName (OCI_Connection *con) |
| Return the Oracle server machine name of the connected database/service name. More... | |
| OCI_EXPORT const otext *OCI_API | OCI_GetDomainName (OCI_Connection *con) |
| Return the Oracle server domain name of the connected database/service name. More... | |
| OCI_EXPORT OCI_Timestamp *OCI_API | OCI_GetInstanceStartTime (OCI_Connection *con) |
| Return the date and time (Timestamp) server instance start of the connected database/service name. More... | |
| OCI_EXPORT boolean OCI_API | OCI_IsTAFCapable (OCI_Connection *con) |
| Verifiy if the given connection support TAF events. More... | |
| OCI_EXPORT boolean OCI_API | OCI_SetTAFHandler (OCI_Connection *con, POCI_TAF_HANDLER handler) |
| Set the Transparent Application Failover (TAF) user handler. More... | |
| OCI_EXPORT unsigned int OCI_API | OCI_GetStatementCacheSize (OCI_Connection *con) |
| Return the maximum number of statements to keep in the statement cache. More... | |
| OCI_EXPORT boolean OCI_API | OCI_SetStatementCacheSize (OCI_Connection *con, unsigned int value) |
| Set the maximum number of statements to keep in the statement cache. More... | |
| OCI_EXPORT unsigned int OCI_API | OCI_GetDefaultLobPrefetchSize (OCI_Connection *con) |
| Return the default LOB prefetch buffer size for the connection. More... | |
| OCI_EXPORT boolean OCI_API | OCI_SetDefaultLobPrefetchSize (OCI_Connection *con, unsigned int value) |
| Enable or disable prefetching for all LOBs fetched in the connection. More... | |
| OCI_EXPORT OCI_Connection* OCI_API OCI_ConnectionCreate | ( | const otext * | db, |
| const otext * | user, | ||
| const otext * | pwd, | ||
| unsigned int | mode | ||
| ) |
#include <ocilib.h>
Create a physical connection to an Oracle database server.
| db | - Oracle Service Name |
| user | - Oracle User name |
| pwd | - Oracle User password |
| mode | - Session mode |
Possible values for parameter mode :
OCILIB supports Oracle XA connectivity. In order to get a connection using the XA interface :
The XA connection string used in a transaction monitor to connect to Oracle must be compatible with OCILIB :
Referenced by ocilib::Connection::Open().
| OCI_EXPORT boolean OCI_API OCI_ConnectionFree | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Close a physical connection to an Oracle database server.
| con | - Connection handle |
Referenced by ocilib::Connection::Open().
| OCI_EXPORT boolean OCI_API OCI_IsConnected | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Returns TRUE is the given connection is still connected otherwise FALSE.
| con | - Connection handle |
Referenced by ocilib::Connection::IsServerAlive().
| OCI_EXPORT void* OCI_API OCI_GetUserData | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the pointer to user data previously associated with the connection.
| con | - Connection handle |
Referenced by ocilib::Connection::GetUserData().
| OCI_EXPORT boolean OCI_API OCI_SetUserData | ( | OCI_Connection * | con, |
| void * | data | ||
| ) |
#include <ocilib.h>
Associate a pointer to user data to the given connection.
| con | - Connection handle |
| data | - User data pointer |
Referenced by ocilib::Connection::SetUserData().
| OCI_EXPORT boolean OCI_API OCI_SetSessionTag | ( | OCI_Connection * | con, |
| const otext * | tag | ||
| ) |
#include <ocilib.h>
Associate a tag to the given connection/session.
| con | - Connection handle |
| tag | - user tag string |
Referenced by ocilib::Connection::SetSessionTag().
| OCI_EXPORT const otext* OCI_API OCI_GetSessionTag | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the tag associated the given connection.
| con | - Connection handle |
Referenced by ocilib::Connection::GetSessionTag().
| OCI_EXPORT const otext* OCI_API OCI_GetDatabase | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the name of the connected database/service name.
| con | - Connection handle |
Referenced by ocilib::Connection::GetConnectionString().
| OCI_EXPORT const otext* OCI_API OCI_GetUserName | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the current logged user name.
| con | - Connection handle |
Referenced by ocilib::Connection::GetUserName().
| OCI_EXPORT const otext* OCI_API OCI_GetPassword | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the current logged user password.
| con | - Connection handle |
Referenced by ocilib::Connection::GetPassword().
| OCI_EXPORT boolean OCI_API OCI_SetPassword | ( | OCI_Connection * | con, |
| const otext * | password | ||
| ) |
#include <ocilib.h>
Change the password of the logged user.
| con | - Connection handle |
| password | - New password |
Referenced by ocilib::Connection::ChangePassword().
| OCI_EXPORT boolean OCI_API OCI_SetUserPassword | ( | const otext * | db, |
| const otext * | user, | ||
| const otext * | pwd, | ||
| const otext * | new_pwd | ||
| ) |
#include <ocilib.h>
Change the password of the given user on the given database.
| db | - Oracle Service Name |
| user | - Oracle User name |
| pwd | - Oracle User password |
| new_pwd | - Oracle User New password |
Referenced by ocilib::Environment::ChangeUserPassword().
| OCI_EXPORT unsigned int OCI_API OCI_GetSessionMode | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the current session mode.
| con | - Connection handle |
| OCI_EXPORT const otext* OCI_API OCI_GetVersionServer | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the connected database server version.
| con | - Connection handle |
Referenced by ocilib::Connection::GetServerVersion().
| OCI_EXPORT unsigned int OCI_API OCI_GetServerMajorVersion | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the major version number of the connected database server.
| con | - Connection handle |
Referenced by ocilib::Connection::GetServerMajorVersion().
| OCI_EXPORT unsigned int OCI_API OCI_GetServerMinorVersion | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the minor version number of the connected database server.
| con | - Connection handle |
Referenced by ocilib::Connection::GetServerMinorVersion().
| OCI_EXPORT unsigned int OCI_API OCI_GetServerRevisionVersion | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the revision version number of the connected database server.
| con | - Connection handle |
Referenced by ocilib::Connection::GetServerRevisionVersion().
| OCI_EXPORT boolean OCI_API OCI_SetDefaultFormatDate | ( | OCI_Connection * | con, |
| const otext * | format | ||
| ) |
#include <ocilib.h>
Set the date format for implicit string / date conversions.
| con | - Connection handle |
| format | - Date format |
Referenced by ocilib::Connection::SetDefaultDateFormat().
| OCI_EXPORT const otext* OCI_API OCI_GetDefaultFormatDate | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the current date format for implicit string / date conversions.
| con | - Connection handle |
Referenced by ocilib::Connection::GetDefaultDateFormat().
| OCI_EXPORT boolean OCI_API OCI_SetDefaultFormatNumeric | ( | OCI_Connection * | con, |
| const otext * | format | ||
| ) |
#include <ocilib.h>
Set the numeric format for implicit string / numeric conversions.
| con | - Connection handle |
| format | - Numeric format |
Referenced by ocilib::Connection::SetDefaultNumericFormat().
| OCI_EXPORT const otext* OCI_API OCI_GetDefaultFormatNumeric | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the current numeric format for implicit string / numeric conversions.
| con | - Connection handle |
Referenced by ocilib::Connection::GetDefaultNumericFormat().
| OCI_EXPORT OCI_Transaction* OCI_API OCI_GetTransaction | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the current transaction of the connection.
| con | - Connection handle |
Referenced by ocilib::Connection::GetTransaction().
| OCI_EXPORT boolean OCI_API OCI_SetTransaction | ( | OCI_Connection * | con, |
| OCI_Transaction * | trans | ||
| ) |
#include <ocilib.h>
Set a transaction to a connection.
| con | - Connection handle |
| trans | - Transaction handle to assign |
Referenced by ocilib::Connection::SetTransaction().
| OCI_EXPORT unsigned int OCI_API OCI_GetVersionConnection | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the highest Oracle version is supported by the connection.
| con | - connection handle |
Referenced by ocilib::Connection::GetVersion().
| OCI_EXPORT boolean OCI_API OCI_SetTrace | ( | OCI_Connection * | con, |
| unsigned int | trace, | ||
| const otext * | value | ||
| ) |
#include <ocilib.h>
Set tracing information to the session of the given connection.
| con | - connection handle |
| trace | - trace type |
| value | - trace content |
Store current trace information to the given connection handle. These information:
Referenced by ocilib::Connection::SetTrace().
| OCI_EXPORT const otext* OCI_API OCI_GetTrace | ( | OCI_Connection * | con, |
| unsigned int | trace | ||
| ) |
#include <ocilib.h>
Get the current trace for the trace type from the given connection.
| con | - connection handle |
| trace | - trace type |
Referenced by ocilib::Connection::GetTrace().
| OCI_EXPORT boolean OCI_API OCI_Ping | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Makes a round trip call to the server to confirm that the connection and the server are active.
| con | - Connection handle |
Referenced by ocilib::Connection::PingServer().
| OCI_EXPORT const otext* OCI_API OCI_GetDBName | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the Oracle server database name of the connected database/service name.
| con | - Connection handle |
Referenced by ocilib::Connection::GetDatabase().
| OCI_EXPORT const otext* OCI_API OCI_GetInstanceName | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the Oracle server Instance name of the connected database/service name.
| con | - Connection handle |
Referenced by ocilib::Connection::GetInstance().
| OCI_EXPORT const otext* OCI_API OCI_GetServiceName | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the Oracle server service name of the connected database/service name.
| con | - Connection handle |
Referenced by ocilib::Connection::GetService().
| OCI_EXPORT const otext* OCI_API OCI_GetServerName | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the Oracle server machine name of the connected database/service name.
| con | - Connection handle |
Referenced by ocilib::Connection::GetServer().
| OCI_EXPORT const otext* OCI_API OCI_GetDomainName | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the Oracle server domain name of the connected database/service name.
| con | - Connection handle |
Referenced by ocilib::Connection::GetDomain().
| OCI_EXPORT OCI_Timestamp* OCI_API OCI_GetInstanceStartTime | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the date and time (Timestamp) server instance start of the connected database/service name.
| con | - Connection handle |
Referenced by ocilib::Connection::GetInstanceStartTime().
| OCI_EXPORT boolean OCI_API OCI_IsTAFCapable | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Verifiy if the given connection support TAF events.
| con | - Connection handle |
Referenced by ocilib::Connection::IsTAFCapable().
| OCI_EXPORT boolean OCI_API OCI_SetTAFHandler | ( | OCI_Connection * | con, |
| POCI_TAF_HANDLER | handler | ||
| ) |
#include <ocilib.h>
Set the Transparent Application Failover (TAF) user handler.
| con | - Connection handle |
| handler | - Pointer to TAF handler procedure |
Referenced by ocilib::Connection::SetTAFHandler().
| OCI_EXPORT unsigned int OCI_API OCI_GetStatementCacheSize | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the maximum number of statements to keep in the statement cache.
| con | - Connection handle |
Referenced by ocilib::Connection::GetStatementCacheSize().
| OCI_EXPORT boolean OCI_API OCI_SetStatementCacheSize | ( | OCI_Connection * | con, |
| unsigned int | value | ||
| ) |
#include <ocilib.h>
Set the maximum number of statements to keep in the statement cache.
| con | - Connection handle |
| value | - maximum number of statements in the cache |
Referenced by ocilib::Connection::SetStatementCacheSize().
| OCI_EXPORT unsigned int OCI_API OCI_GetDefaultLobPrefetchSize | ( | OCI_Connection * | con | ) |
#include <ocilib.h>
Return the default LOB prefetch buffer size for the connection.
| con | - Connection handle |
Referenced by ocilib::Connection::GetDefaultLobPrefetchSize().
| OCI_EXPORT boolean OCI_API OCI_SetDefaultLobPrefetchSize | ( | OCI_Connection * | con, |
| unsigned int | value | ||
| ) |
#include <ocilib.h>
Enable or disable prefetching for all LOBs fetched in the connection.
| con | - Connection handle |
| value | - default prefetch buffer size |
Referenced by ocilib::Connection::SetDefaultLobPrefetchSize().