All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PODBCStmt Class Reference

`#include <podbc.h>`

Inheritance diagram for PODBCStmt:

## 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
Public Member Functions inherited from PObject
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

Public Types inherited from PObject
enum | Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 }
| Result of the comparison operation performed by the `Compare()` function. More...
Static Public Member Functions inherited from PObject
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...
Protected Member Functions inherited from PObject
| PObject ()
| Constructor for PObject, made protected so cannot ever create one on its own. More...

## Constructor & Destructor Documentation

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.

## Member Function Documentation

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.

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.

PBoolean PODBCStmt::IsValid | ( |  | ) |

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

## Member Data Documentation

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().

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

- podbc.h