PTLib
Version 2.10.4
|
#include <podbc.h>
Public Member Functions | |
Constructor/Deconstructor | |
PODBCStmt (PODBC *odbc) | |
Constructor PODBC (Datasources call) or thro' DSNConnection (Connection call). | |
~PODBCStmt () | |
Deconstructor. | |
Handles | |
operator HSTMT () | |
Statement Handle Created by the Query Function. | |
Data Management | |
PBoolean | IsValid () |
IsValid Checks to ensure a Handle has been allocated and is effective. | |
DWORD | GetChangedRowCount (void) |
GetChangedRowCount retreives the number of rows updated/altered by UPDATE/INSERT statements. | |
PBoolean | Query (PString strSQL) |
Query function is the Main function to pass SQL statements to retreive/ add/Modify database data. | |
Data Retrieval | |
PBoolean | Fetch () |
Fetch General call to retreive the next row of data. | |
PBoolean | FetchRow (PINDEX nRow, PBoolean Absolute=1) |
FetchRow More detailed fetching of Rows. | |
PBoolean | FetchPrevious () |
FetchPrevious Fetch the previous Row from current row. | |
PBoolean | FetchNext () |
FetchNext: Fetch the Next row. | |
PBoolean | FetchFirst () |
FetchFirst Fetch the First row in the RecordSet. | |
PBoolean | FetchLast () |
FetchLast Fetch the Last row in the RecordSet. | |
PBoolean | Cancel () |
Cancel the Current Statement. | |
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. | |
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. | |
void | GetLastError () |
Get the Last Error This returns the Error ID & String to PODBC::OnSQLError. | |
PODBC * | GetLink () const |
int | GetDBase () const |
Protected Attributes | |
HSTMT | m_hStmt |
PODBC * | odbclink |
int | dbase |
Reference to the PODBC Class. |
PODBCStmt::PODBCStmt | ( | PODBC * | odbc | ) |
Constructor PODBC (Datasources call) or thro' DSNConnection (Connection call).
In General this class is constructed within the PODBC::Table Class.
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.
Cancel the Current Statement.
Fetch General call to retreive the next row of data.
FetchFirst Fetch the First row in the RecordSet.
FetchLast Fetch the Last row in the RecordSet.
FetchNext: Fetch the Next row.
FetchPrevious Fetch the previous Row from current row.
PBoolean PODBCStmt::FetchRow | ( | PINDEX | nRow, |
PBoolean | Absolute = 1 |
||
) |
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.
int PODBCStmt::GetDBase | ( | ) | const [inline] |
References dbase.
void PODBCStmt::GetLastError | ( | ) |
Get the Last Error This returns the Error ID & String to PODBC::OnSQLError.
PODBC* PODBCStmt::GetLink | ( | ) | const [inline] |
References odbclink.
IsValid Checks to ensure a Handle has been allocated and is effective.
PODBCStmt::operator HSTMT | ( | ) | [inline] |
Statement Handle Created by the Query Function.
References m_hStmt.
PBoolean PODBCStmt::Query | ( | PString | strSQL | ) |
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*
int PODBCStmt::dbase [protected] |
Reference to the PODBC Class.
Referenced by GetDBase().
HSTMT PODBCStmt::m_hStmt [protected] |
Referenced by operator HSTMT().
PODBC* PODBCStmt::odbclink [protected] |
Referenced by GetLink().