Oracle C++ Call Interface Programmer's Guide Release 2 (9.2) Part Number A96583-01 |
|
OCCI Classes and Methods, 6 of 22
The Connection class represents a connection with a specific database. Within the context of a connection, SQL statements are executed and results are returned.
To create a connection, use the syntax:
Connection();
This method changes the password of the user currently connected to the database.
void changePassword(const string &user, const string &oldPassword, const string &newPassword);
The user currently connected to the database.
The current password of the user.
The new password of the user.
This method commits all changes made since the previous commit or rollback, and releases any database locks currently held by the session.
void commit();
This method creates a Statement
object with the SQL statement specified.
Statement* createStatement(const string &sql ="");
The SQL string to be associated with the statement object.
This method flushes the object cache associated with the connection.
void flushCache();
This method returns the session's character set.
string getClientCharSet() const;
This method returns the session's NCHAR character set.
string getClientNCHARCharSet() const;
This method returns metadata for an object in the database.
There are variants of syntax:
MetaData getMetaData(const string &object, MetaData::ParamType prmtyp = MetaData::PTYPE_UNK) const;
MetaData getMetaData(const RefAny &ref) const;
The schema object to be described.
The type of the schema object being described. The possible values for this are enumerated by MetaData::ParamType
.
Valid values are:
PTYPE_TABLE
--table
PTYPE_VIEW
--view
PTYPE_PROC
--procedure
PTYPE_FUNC
--function
PTYPE_PKG
--package
PTYPE_TYPE
--type
PTYPE_TYPE_ATTR
--attribute of a type
PTYPE_TYPE_COLL
--collection type information
PTYPE_TYPE_METHOD
--a method of a type
PTYPE_SYN
--synonym
PTYPE_SEQ
--sequence
PTYPE_COL
--column of a table or view
PTYPE_ARG
--argument of a function or procedure
PTYPE_TYPE_ARG
--argument of a type method
PTYPE_TYPE_RESULT
--the results of a method
PTYPE_SCHEMA
--schema
PTYPE_DATABASE
--database
PTYPE_UNK
--type unknown
A REF
to the Type Descriptor Object (TDO) of the type to be described.
This method returns the OCI server context associated with the connection.
LNOCIServer* getOCIServer() const;
This method returns the OCI service context associated with the connection.
LNOCISvcCtx* getOCIServiceContext() const;
This method returns the OCI session context associated with the connection.
LNOCISession* getOCISession() const;
This method drops all changes made since the previous commit or rollback, and releases any database locks currently held by the session.
void rollback();
This method closes a Statement
object and frees all resources associated with it.
void terminateStatement(Statement *statement);
The Statement
to be closed.
|
Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|