PTLib
Version 2.10.10
|
PODBCRecord This Class is used to analyse the fetched data and handles Data Conversion/Read Write operations. More...
#include <podbc.h>
Public Member Functions | |
Constructor/Deconstructor | |
PODBCRecord (PODBCStmt *hStmt) | |
Constructor. | |
~PODBCRecord () | |
Deconstructor. | |
Data Collection/Saving | |
void | Data (PINDEX Column, PODBC::Field &field) |
Data: Main Call to retrieve and convert Field Data and return the information in the PODBC::Field structure. | |
PBoolean | InternalGetData (USHORT Column, LPVOID pBuffer, ULONG pBufLen, SQLINTEGER *dataLen=NULL, int Type=SQL_C_DEFAULT) |
InternalGetData is call when retrieving string or large binary | |
PString | GetLongData (PINDEX Column) |
PBoolean | PostNew (PODBC::Row &rec) |
Post the new record back to the RecordSet;. | |
PBoolean | PostUpdate (PODBC::Row &rec) |
Post the Updated record back to the RecordSet;. | |
PBoolean | PostDelete (PINDEX row=1) |
Post a Delete command to the RecordSet; Default | |
PBoolean | InternalSaveLongData (SQLRETURN nRet, PODBC::Row &rec) |
Check for and Save Long Data. | |
PBoolean | InternalBindColumn (USHORT Column, LPVOID pBuffer, ULONG pBufferSize, LONG *pReturnedBufferSize=NULL, USHORT nType=SQL_C_TCHAR) |
InternalBindColumn for Data input. | |
Data Information | |
PINDEX | ColumnByName (PString Column) |
ColumnByName returns the column number of the column name | |
PINDEX | ColumnCount () |
ColumnCount No of columns. | |
PODBC::FieldTypes | ColumnType (PINDEX Column) |
ColumnTypes. | |
DWORD | ColumnSize (PINDEX Column) |
Column Size. | |
DWORD | ColumnScale (PINDEX Column) |
Column Scale. | |
PString | ColumnName (PINDEX Column) |
Column Name. | |
unsigned int | ColumnPrecision (PINDEX Column) |
ColumnPrecision Get the Number of Decimal places if Precision is set the precision is set to the lessor of the Two. | |
PBoolean | IsColumnNullable (PINDEX Column) |
IsColumn Nullable. | |
PBoolean | IsColumnUpdatable (PINDEX Column) |
IsColumn Updateable ie is not ReadOnly. | |
PBoolean | IsColumnAutoIndex (PINDEX Column) |
IsColumnAutoIndex (ie don't give default Value) | |
![]() | |
virtual | ~PObject () |
virtual PObject * | Clone () const |
Create a copy of the class on the heap. | |
virtual PINDEX | HashFunction () const |
This function yields a hash value required by the PDictionary class. | |
virtual const char * | GetClass (unsigned ancestor=0) const |
Get the current dynamic type of the object instance. | |
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. | |
virtual Comparison | Compare (const PObject &obj) const |
Compare the two objects and return their relative rank. | |
virtual Comparison | CompareObjectMemoryDirect (const PObject &obj) const |
Determine the byte wise comparison of two objects. | |
bool | operator== (const PObject &obj) const |
Compare the two objects. | |
bool | operator!= (const PObject &obj) const |
Compare the two objects. | |
bool | operator< (const PObject &obj) const |
Compare the two objects. | |
bool | operator> (const PObject &obj) const |
Compare the two objects. | |
bool | operator<= (const PObject &obj) const |
Compare the two objects. | |
bool | operator>= (const PObject &obj) const |
Compare the two objects. | |
virtual void | PrintOn (ostream &strm) const |
Output the contents of the object to the stream. | |
virtual void | ReadFrom (istream &strm) |
Input the contents of the object from the stream. |
Static Public Attributes | |
Data Conversion Settings | |
static unsigned int | Precision |
Conversion Settings. | |
static int | MaxCharSize |
Double Real Float Decimal digit rounding def= 4;. | |
static PTime::TimeFormat | TimeFormat |
Long Data Limit KBytes def = 56; (56 Kbytes) |
Protected Attributes | |
HSTMT | m_hStmt |
Time Format. | |
PODBCStmt * | Stmt |
PODBC::DataSources | dbase |
Statement Class. |
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. | |
static Comparison | InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size) |
Internal function caled from CompareObjectMemoryDirect() | |
![]() | |
PObject () | |
Constructor for PObject, made protected so cannot ever create one on its own. | |
![]() |
PODBCRecord This Class is used to analyse the fetched data and handles Data Conversion/Read Write operations.
It is used in conjuction with the PODBCStmt Class
PODBCRecord::PODBCRecord | ( | PODBCStmt * | hStmt | ) |
Constructor.
|
inline |
Deconstructor.
PINDEX PODBCRecord::ColumnByName | ( | PString | Column | ) |
ColumnByName returns the column number of the column name
If not found returns column value of 0;
PINDEX PODBCRecord::ColumnCount | ( | ) |
ColumnCount No of columns.
PString PODBCRecord::ColumnName | ( | PINDEX | Column | ) |
Column Name.
unsigned int PODBCRecord::ColumnPrecision | ( | PINDEX | Column | ) |
ColumnPrecision Get the Number of Decimal places
if Precision is set the precision is set to the lessor of the Two.
DWORD PODBCRecord::ColumnScale | ( | PINDEX | Column | ) |
Column Scale.
DWORD PODBCRecord::ColumnSize | ( | PINDEX | Column | ) |
Column Size.
PODBC::FieldTypes PODBCRecord::ColumnType | ( | PINDEX | Column | ) |
ColumnTypes.
void PODBCRecord::Data | ( | PINDEX | Column, |
PODBC::Field & | field | ||
) |
Data: Main Call to retrieve and convert Field Data
and return the information in the PODBC::Field structure.
PString PODBCRecord::GetLongData | ( | PINDEX | Column | ) |
PBoolean PODBCRecord::InternalBindColumn | ( | USHORT | Column, |
LPVOID | pBuffer, | ||
ULONG | pBufferSize, | ||
LONG * | pReturnedBufferSize = NULL , |
||
USHORT | nType = SQL_C_TCHAR |
||
) |
InternalBindColumn for Data input.
PBoolean PODBCRecord::InternalGetData | ( | USHORT | Column, |
LPVOID | pBuffer, | ||
ULONG | pBufLen, | ||
SQLINTEGER * | dataLen = NULL , |
||
int | Type = SQL_C_DEFAULT |
||
) |
InternalGetData is call when retrieving string or large binary
data where the size is indetermined.
The Function can be iteratively called until the function returns false.
PBoolean PODBCRecord::InternalSaveLongData | ( | SQLRETURN | nRet, |
PODBC::Row & | rec | ||
) |
Check for and Save Long Data.
PBoolean PODBCRecord::IsColumnAutoIndex | ( | PINDEX | Column | ) |
IsColumnAutoIndex (ie don't give default Value)
PBoolean PODBCRecord::IsColumnNullable | ( | PINDEX | Column | ) |
IsColumn Nullable.
Accepts NULL value
PBoolean PODBCRecord::IsColumnUpdatable | ( | PINDEX | Column | ) |
IsColumn Updateable ie is not ReadOnly.
PBoolean PODBCRecord::PostDelete | ( | PINDEX | row = 1 | ) |
Post a Delete command to the RecordSet; Default
1 Row is deleted.
PBoolean PODBCRecord::PostNew | ( | PODBC::Row & | rec | ) |
Post the new record back to the RecordSet;.
PBoolean PODBCRecord::PostUpdate | ( | PODBC::Row & | rec | ) |
Post the Updated record back to the RecordSet;.
|
protected |
Statement Class.
|
protected |
Time Format.
|
static |
Double Real Float Decimal digit rounding def= 4;.
|
static |
Conversion Settings.
|
protected |
|
static |
Long Data Limit KBytes def = 56; (56 Kbytes)