PTLib
Version 2.10.11
|
#include <podbc.h>
Public Member Functions | |
Constructor/Deconstructor | |
PODBCStmt (PODBC *odbc) | |
Constructor PODBC (Datasources call) or thro' DSNConnection (Connection call). More... | |
~PODBCStmt () | |
Deconstructor. More... | |
Handles | |
operator HSTMT () | |
Statement Handle Created by the Query Function. More... | |
Data Management | |
PBoolean | IsValid () |
IsValid Checks to ensure a Handle has been allocated and is effective. More... | |
DWORD | GetChangedRowCount (void) |
GetChangedRowCount retreives the number of rows updated/altered by UPDATE/INSERT statements. More... | |
PBoolean | Query (PString strSQL) |
Query function is the Main function to pass SQL statements to retreive/ add/Modify database data. More... | |
Data Retrieval | |
PBoolean | Fetch () |
Fetch General call to retreive the next row of data. More... | |
PBoolean | FetchRow (PINDEX nRow, PBoolean Absolute=1) |
FetchRow More detailed fetching of Rows. More... | |
PBoolean | FetchPrevious () |
FetchPrevious Fetch the previous Row from current row. More... | |
PBoolean | FetchNext () |
FetchNext: Fetch the Next row. More... | |
PBoolean | FetchFirst () |
FetchFirst Fetch the First row in the RecordSet. More... | |
PBoolean | FetchLast () |
FetchLast Fetch the Last row in the RecordSet. More... | |
PBoolean | Cancel () |
Cancel the Current Statement. More... | |
Utilities | |
PStringArray | TableList (PString option="") |
Retreive the List of Tables from the current Datasource The option field can be used to specify the Table Types ie "TABLE" for Tables or "VIEW" for preconfigured datasource queries. More... | |
PBoolean | SQL_OK (SQLRETURN res) |
Is the SQL Instruction OK If an Error is detected then GetLastError is called to Retrieve the SQL Error Information and Returns false. More... | |
void | GetLastError () |
Get the Last Error This returns the Error ID & String to PODBC::OnSQLError. More... | |
PODBC * | GetLink () const |
int | GetDBase () const |
![]() | |
virtual | ~PObject () |
virtual PObject * | Clone () const |
Create a copy of the class on the heap. More... | |
virtual PINDEX | HashFunction () const |
This function yields a hash value required by the PDictionary class. More... | |
virtual const char * | GetClass (unsigned ancestor=0) const |
Get the current dynamic type of the object instance. More... | |
PBoolean | IsClass (const char *cls) const |
virtual PBoolean | InternalIsDescendant (const char *clsName) const |
Determine if the dynamic type of the current instance is a descendent of the specified class. More... | |
virtual Comparison | Compare (const PObject &obj) const |
Compare the two objects and return their relative rank. More... | |
virtual Comparison | CompareObjectMemoryDirect (const PObject &obj) const |
Determine the byte wise comparison of two objects. More... | |
bool | operator== (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator!= (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator< (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator> (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator<= (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator>= (const PObject &obj) const |
Compare the two objects. More... | |
virtual void | PrintOn (ostream &strm) const |
Output the contents of the object to the stream. More... | |
virtual void | ReadFrom (istream &strm) |
Input the contents of the object from the stream. More... | |
Protected Attributes | |
HSTMT | m_hStmt |
PODBC * | odbclink |
int | dbase |
Reference to the PODBC Class. More... | |
Additional Inherited Members | |
![]() | |
enum | Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 } |
Result of the comparison operation performed by the Compare() function. More... | |
![]() | |
static const char * | Class () |
Get the name of the class as a C string. More... | |
static Comparison | InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size) |
Internal function caled from CompareObjectMemoryDirect() More... | |
![]() | |
PObject () | |
Constructor for PObject, made protected so cannot ever create one on its own. More... | |
PODBCStmt::PODBCStmt | ( | PODBC * | odbc | ) |
Constructor PODBC (Datasources call) or thro' DSNConnection (Connection call).
In General this class is constructed within the PODBC::Table Class.
PODBCStmt::~PODBCStmt | ( | ) |
Deconstructor.
This Class should be available for the duration of which a specific query/table is required and be deconstructed at the time of the PODBC::Table deconstruction.
PBoolean PODBCStmt::Cancel | ( | ) |
Cancel the Current Statement.
PBoolean PODBCStmt::Fetch | ( | ) |
Fetch General call to retreive the next row of data.
PBoolean PODBCStmt::FetchFirst | ( | ) |
FetchFirst Fetch the First row in the RecordSet.
PBoolean PODBCStmt::FetchLast | ( | ) |
FetchLast Fetch the Last row in the RecordSet.
PBoolean PODBCStmt::FetchNext | ( | ) |
FetchNext: Fetch the Next row.
PBoolean PODBCStmt::FetchPrevious | ( | ) |
FetchPrevious Fetch the previous Row from current row.
FetchRow More detailed fetching of Rows.
This allows you to fetch an Absolute row or a row relative to the current row fetched.
DWORD PODBCStmt::GetChangedRowCount | ( | void | ) |
GetChangedRowCount retreives the number of rows updated/altered by UPDATE/INSERT statements.
|
inline |
References dbase.
void PODBCStmt::GetLastError | ( | ) |
Get the Last Error This returns the Error ID & String to PODBC::OnSQLError.
PBoolean PODBCStmt::IsValid | ( | ) |
IsValid Checks to ensure a Handle has been allocated and is effective.
|
inline |
Statement Handle Created by the Query Function.
References m_hStmt.
Query function is the Main function to pass SQL statements to retreive/ add/Modify database data.
It accepts generally acceptable SQL Statements. ie. Select * from [table-x]
PBoolean PODBCStmt::SQL_OK | ( | SQLRETURN | res | ) |
Is the SQL Instruction OK If an Error is detected then GetLastError is called to Retrieve the SQL Error Information and Returns false.
PStringArray PODBCStmt::TableList | ( | PString | option = "" | ) |
Retreive the List of Tables from the current Datasource The option field can be used to specify the Table Types ie "TABLE" for Tables or "VIEW" for preconfigured datasource queries.
Further investigation is required
|
protected |
Reference to the PODBC Class.
Referenced by GetDBase().
|
protected |
Referenced by operator HSTMT().