Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

O3DBIStatement Class Reference

#include <O3DBIStatement.h>

Inheritance diagram for O3DBIStatement:

Inheritance graph
[legend]
Collaboration diagram for O3DBIStatement:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 O3DBIStatement ()
 O3DBIStatement (PC_TCHAR pchStmnt)
 O3DBIStatement (const O3DBIStatement &other)
virtual ~O3DBIStatement ()
O3DBIStatementoperator= (const O3DBIStatement &other)
O3DBIStatementoperator= (PC_TCHAR pchStmnt)
bool operator== (const O3DBIStatement &other) const
void SetStatement (PC_TCHAR pchStmnt)
PC_TCHAR GetStatement (void) const
void SetBindVariable (PC_TCHAR pchPlaceholderName, int iValue)
void SetBindVariable (PC_TCHAR pchPlaceholderName, unsigned int uValue)
void SetBindVariable (PC_TCHAR pchPlaceholderName, long lValue)
void SetBindVariable (PC_TCHAR pchPlaceholderName, unsigned long ulValue)
void SetBindVariable (PC_TCHAR pchPlaceholderName, float fValue)
void SetBindVariable (PC_TCHAR pchPlaceholderName, double dValue)
void SetBindVariable (PC_TCHAR pchPlaceholderName, const TO3DBIString &strValue)
void SetBindVariable (PC_TCHAR pchPlaceholderName, PC_TCHAR pchValue)
void SetBindVariable (PC_TCHAR pchPlaceholderName, const O3DBIDate &dtValue)
void SetBindVariable (PC_TCHAR pchPlaceholderName, const O3DBITimestamp &tsValue)
void SetBindVariable (PC_TCHAR pchPlaceholderName, const O3DBIClob &value)
void SetBindVariable (PC_TCHAR pchPlaceholderName, const O3DBIBlob &value)
void SetBindVariable (PC_TCHAR pchPlaceholderName, const O3DBIBfile &value)
void SetBindVariable (PC_TCHAR pchPlaceholderName, const O3DBIXml &value)
void SetBindVariable (TO3DBIBinderPos position, int iValue)
void SetBindVariable (TO3DBIBinderPos position, unsigned int uValue)
void SetBindVariable (TO3DBIBinderPos position, long lValue)
void SetBindVariable (TO3DBIBinderPos position, unsigned long ulValue)
void SetBindVariable (TO3DBIBinderPos position, float fValue)
void SetBindVariable (TO3DBIBinderPos position, double dValue)
void SetBindVariable (TO3DBIBinderPos position, const TO3DBIString &strValue)
void SetBindVariable (TO3DBIBinderPos position, PC_TCHAR pchValue)
void SetBindVariable (TO3DBIBinderPos position, const O3DBIDate &dtValue)
void SetBindVariable (TO3DBIBinderPos position, const O3DBITimestamp &tsValue)
void SetBindVariable (TO3DBIBinderPos position, const O3DBIClob &value)
void SetBindVariable (TO3DBIBinderPos position, const O3DBIBlob &value)
void SetBindVariable (TO3DBIBinderPos position, const O3DBIBfile &value)
void SetBindVariable (TO3DBIBinderPos position, const O3DBIXml &value)
void DefineResultType (TO3DBIColumnPos position, const O3DBIDataField &field)
TO3DBIResult Execute (O3DBIDatabase &db, O3DBIRecordSet &recordset)
TO3DBIResult ExecuteAsync (O3DBIDatabase &db, O3DBIRecordSet &recordset)
bool IsStillExecuting (void)
bool Terminate (void)
virtual TO3DBIString ToString (void) const

Detailed Description

Objects of this class allows to prepare and execute SQL, PL/SQL statements or to call stored procedures on the Oracle database server.

Definition at line 52 of file O3DBIStatement.h.


Constructor & Destructor Documentation

O3DBIStatement::O3DBIStatement  ) 
 

The default constructor.

Definition at line 18 of file O3DBIStatement.cpp.

O3DBIStatement::O3DBIStatement PC_TCHAR  pchStmnt  ) 
 

An initialization constructor.

Returns:
pchStmnt is a const pointer to a zero-terminated string containing the SQL or PL/SQL statement.

Definition at line 25 of file O3DBIStatement.cpp.

O3DBIStatement::O3DBIStatement const O3DBIStatement other  ) 
 

A copy constructor.

Parameters:
other is a const reference to another O3DBIStatement object.

Definition at line 36 of file O3DBIStatement.cpp.

O3DBIStatement::~O3DBIStatement  )  [virtual]
 

The virtual destructor.

Definition at line 44 of file O3DBIStatement.cpp.


Member Function Documentation

void O3DBIStatement::DefineResultType TO3DBIColumnPos  position,
const O3DBIDataField field
 

Call this member function to associate the column of a select-list with a datatype and with a name.

Parameters:
position defines the position of the returned value in the select-list. Positions are 1-based and are numbered from left to right.
field is a const reference to an O3DBIDataField object defining the datatype and name of the column referenced by position. The value of the field is of no significance, because only the name and datatype information is evaluated by this function.

TO3DBIResult O3DBIStatement::Execute O3DBIDatabase db,
O3DBIRecordSet recordset
 

Call this member function to execute a statement synchronously, i.e. the function will not return until the execution of the statement is complete, either successfully or in error.

Precondition:
db.

Definition at line 104 of file O3DBIStatement.cpp.

References TO3DBIResult.

TO3DBIResult O3DBIStatement::ExecuteAsync O3DBIDatabase db,
O3DBIRecordSet recordset
 

Call this member function to execute a statement asynchronously, i.e. the function will return immediately. It is a task of the client application to test whether the pending statement execution is finished at the server. This can be done by a polling paradigm, which means that the client application has to call O3DBIStatement::IsStillExecuting periodically to determine that the execution is finished. This execution mode is particularly useful in Graphical User Interface (GUI) applications, real-time applications, and in distributed environments.

Definition at line 113 of file O3DBIStatement.cpp.

References TO3DBIResult.

PC_TCHAR O3DBIStatement::GetStatement void   )  const
 

Call this member function to get the statement string.

Returns:
A const pointer to the zero-terminated statement string.

Definition at line 93 of file O3DBIStatement.cpp.

References PC_TCHAR.

Referenced by ToString().

bool O3DBIStatement::IsStillExecuting void   ) 
 

Call this member function to determine that a statement, which was executed by a call of O3DBIStatement::ExecuteAsync, is finished.

Returns:
true, if the statement is still executing, false if the execution of the statement is finished.

Definition at line 122 of file O3DBIStatement.cpp.

O3DBIStatement & O3DBIStatement::operator= PC_TCHAR  pchStmnt  ) 
 

An assignment operator for a statement string.

See also:
O3DBIStatement::SetStatement
Parameters:
pchStmnt is a const pointer to a zero-terminated string containing the statement.

Definition at line 71 of file O3DBIStatement.cpp.

O3DBIStatement & O3DBIStatement::operator= const O3DBIStatement other  ) 
 

An assignment (copy) operator.

Parameters:
other is a const reference to another O3DBIStatement object.

Definition at line 62 of file O3DBIStatement.cpp.

References _pchStmnt.

bool O3DBIStatement::operator== const O3DBIStatement other  )  const
 

A comparison operator 'equal-to'.

Parameters:
other is a const reference to another O3DBIStatement object.
Returns:
true, if both O3DBIStatement objects are equal, false otherwise.

Definition at line 80 of file O3DBIStatement.cpp.

References _pchStmnt.

void O3DBIStatement::SetBindVariable TO3DBIBinderPos  position,
const O3DBIXml value
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
position defines the position of the placeholder.
value is a const reference to a O3DBIXml object containing the XMLTYPE to set.

void O3DBIStatement::SetBindVariable TO3DBIBinderPos  position,
const O3DBIBfile value
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
position defines the position of the placeholder.
value is a const reference to a O3DBIBfile object containing the BFILE to set.

void O3DBIStatement::SetBindVariable TO3DBIBinderPos  position,
const O3DBIBlob value
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
position defines the position of the placeholder.
value is a const reference to a O3DBIClob object containing the BLOB (binary large object) value to set.

void O3DBIStatement::SetBindVariable TO3DBIBinderPos  position,
const O3DBIClob value
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
position defines the position of the placeholder.
value is a const reference to a O3DBIClob object containing the CLOB (character large object) value to set.

void O3DBIStatement::SetBindVariable TO3DBIBinderPos  position,
const O3DBITimestamp tsValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
position defines the position of the placeholder.
tsValue is a const reference to an O3DBITimestamp object containing the timestamp value to set.

void O3DBIStatement::SetBindVariable TO3DBIBinderPos  position,
const O3DBIDate dtValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
position defines the position of the placeholder.
dtValue is a const reference to an O3DBIDate object containing the date value to set.

void O3DBIStatement::SetBindVariable TO3DBIBinderPos  position,
PC_TCHAR  pchValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
position defines the position of the placeholder.
pchValue is a const pointer to a zero terminated string to set.

void O3DBIStatement::SetBindVariable TO3DBIBinderPos  position,
const TO3DBIString strValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
position defines the position of the placeholder.
strValue is a const reference to a TO3DBIString object containing the string to set.

void O3DBIStatement::SetBindVariable TO3DBIBinderPos  position,
double  dValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
position defines the position of the placeholder.
dValue is an IEEE 8-byte (double precision) floating point value with a range of approximately 2.22E–308 to 1.79E+308 containing the value to set.

void O3DBIStatement::SetBindVariable TO3DBIBinderPos  position,
float  fValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
position defines the position of the placeholder.
fValue is an IEEE 4-byte floating point value with a range of approximately 3.4E–38 to 3.4E+38 containing the value to set.

void O3DBIStatement::SetBindVariable TO3DBIBinderPos  position,
unsigned long  ulValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
position defines the position of the placeholder.
ulValue is an unsigned long containing the value to set.

void O3DBIStatement::SetBindVariable TO3DBIBinderPos  position,
long  lValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
position defines the position of the placeholder.
lValue is a signed long containing the value to set.

void O3DBIStatement::SetBindVariable TO3DBIBinderPos  position,
unsigned int  uValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
position defines the position of the placeholder.
uValue is an unsigned integer containing the value to set.

void O3DBIStatement::SetBindVariable TO3DBIBinderPos  position,
int  iValue
 

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
position defines the position of the placeholder.
iValue is an integer containing the value to set.

void O3DBIStatement::SetBindVariable PC_TCHAR  pchPlaceholderName,
const O3DBIXml value
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
pchPlaceholderName is a pointer to a zero-terminated string specifying the placeholder by its name.
value is a const reference to a O3DBIXml object containing the XMLTYPE to set.

void O3DBIStatement::SetBindVariable PC_TCHAR  pchPlaceholderName,
const O3DBIBfile value
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
pchPlaceholderName is a pointer to a zero-terminated string specifying the placeholder by its name.
value is a const reference to a O3DBIBfile object containing the BFILE to set.

void O3DBIStatement::SetBindVariable PC_TCHAR  pchPlaceholderName,
const O3DBIBlob value
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
pchPlaceholderName is a pointer to a zero-terminated string specifying the placeholder by its name.
value is a const reference to a O3DBIClob object containing the BLOB (binary large object) value to set.

void O3DBIStatement::SetBindVariable PC_TCHAR  pchPlaceholderName,
const O3DBIClob value
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
pchPlaceholderName is a pointer to a zero-terminated string specifying the placeholder by its name.
value is a const reference to a O3DBIClob object containing the CLOB (character large object) value to set.

void O3DBIStatement::SetBindVariable PC_TCHAR  pchPlaceholderName,
const O3DBITimestamp tsValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
pchPlaceholderName is a pointer to a zero-terminated string specifying the placeholder by its name.
tsValue is a const reference to an O3DBITimestamp object containing the timestamp value to set.

void O3DBIStatement::SetBindVariable PC_TCHAR  pchPlaceholderName,
const O3DBIDate dtValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
pchPlaceholderName is a pointer to a zero-terminated string specifying the placeholder by its name.
dtValue is a const reference to an O3DBIDate object containing the date value to set.

void O3DBIStatement::SetBindVariable PC_TCHAR  pchPlaceholderName,
PC_TCHAR  pchValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
pchPlaceholderName is a pointer to a zero-terminated string specifying the placeholder by its name.
pchValue is a const pointer to a zero terminated string to set.

void O3DBIStatement::SetBindVariable PC_TCHAR  pchPlaceholderName,
const TO3DBIString strValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
pchPlaceholderName is a pointer to a zero-terminated string specifying the placeholder by its name.
strValue is a const reference to a TO3DBIString object containing the string to set.

void O3DBIStatement::SetBindVariable PC_TCHAR  pchPlaceholderName,
double  dValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
pchPlaceholderName is a pointer to a zero-terminated string specifying the placeholder by its name.
dValue is an IEEE 8-byte (double precision) floating point value with a range of approximately 2.22E–308 to 1.79E+308 containing the value to set.

void O3DBIStatement::SetBindVariable PC_TCHAR  pchPlaceholderName,
float  fValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
pchPlaceholderName is a pointer to a zero-terminated string specifying the placeholder by its name.
fValue is an IEEE 4-byte floating point value with a range of approximately 3.4E–38 to 3.4E+38 containing the value to set.

void O3DBIStatement::SetBindVariable PC_TCHAR  pchPlaceholderName,
unsigned long  ulValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
pchPlaceholderName is a pointer to a zero-terminated string specifying the placeholder by its name.
ulValue is an unsigned long containing the value to set.

void O3DBIStatement::SetBindVariable PC_TCHAR  pchPlaceholderName,
long  lValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
pchPlaceholderName is a pointer to a zero-terminated string specifying the placeholder by its name.
lValue is a signed long containing the value to set.

void O3DBIStatement::SetBindVariable PC_TCHAR  pchPlaceholderName,
unsigned int  uValue
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
pchPlaceholderName is a pointer to a zero-terminated string specifying the placeholder by its name.
uValue is an unsigned integer containing the value to set.

void O3DBIStatement::SetBindVariable PC_TCHAR  pchPlaceholderName,
int  iValue
 

Call this function to set a value for a placeholder in the SQL statement or PL/SQL block.

Parameters:
pchPlaceholderName is a pointer to a zero-terminated string specifying the placeholder by its name.
iValue is an integer containing the value to set.

Definition at line 98 of file O3DBIStatement.cpp.

void O3DBIStatement::SetStatement PC_TCHAR  pchStmnt  ) 
 

Call this member function to set a statement string.

See also:
O3DBIStatement::operator=
Parameters:
pchStmnt is a const pointer to a zero-terminated string containing the statement.

Definition at line 85 of file O3DBIStatement.cpp.

bool O3DBIStatement::Terminate void   ) 
 

Call this member function to terminate a pending execution of a statement.

Definition at line 127 of file O3DBIStatement.cpp.

TO3DBIString O3DBIStatement::ToString void   )  const [virtual]
 

This member function returns a string that "textually represents" this object.

Returns:
A TO3DBIString object containing the string.

Reimplemented from O3DBIObject.

Definition at line 132 of file O3DBIStatement.cpp.

References GetStatement(), and TO3DBIString.


The documentation for this class was generated from the following files:


SourceForge.net Logo Generated on Sun Jan 23 11:36:47 2005 for Oracle Object Oriented Database Interface (O3DBI) by  doxygen 1.3.9.1