PTLib  Version 2.10.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PODBCRecord Class Reference

PODBCRecord This Class is used to analyse the fetched data and handles Data Conversion/Read Write operations. More...

#include <podbc.h>

Inheritance diagram for PODBCRecord:
PObject

Public Member Functions

Constructor/Deconstructor
 PODBCRecord (PODBCStmt *hStmt)
 Constructor. More...
 
 ~PODBCRecord ()
 Deconstructor. More...
 
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. More...

 
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 

data where the size is indetermined. More...

 
PString GetLongData (PINDEX Column)
 
PBoolean PostNew (PODBC::Row &rec)
 Post the new record back to the RecordSet;. More...
 
PBoolean PostUpdate (PODBC::Row &rec)
 Post the Updated record back to the RecordSet;. More...
 
PBoolean PostDelete (PINDEX row=1)
 
Post a Delete command to the RecordSet; Default

1 Row is deleted. More...

 
PBoolean InternalSaveLongData (SQLRETURN nRet, PODBC::Row &rec)
 Check for and Save Long Data. More...
 
PBoolean InternalBindColumn (USHORT Column, LPVOID pBuffer, ULONG pBufferSize, LONG *pReturnedBufferSize=NULL, USHORT nType=SQL_C_TCHAR)
 InternalBindColumn for Data input. More...
 
Data Information
PINDEX ColumnByName (PString Column)
 
ColumnByName returns the column number of the column name

If not found returns column value of 0; More...

 
PINDEX ColumnCount ()
 ColumnCount No of columns. More...
 
PODBC::FieldTypes ColumnType (PINDEX Column)
 ColumnTypes. More...
 
DWORD ColumnSize (PINDEX Column)
 Column Size. More...
 
DWORD ColumnScale (PINDEX Column)
 Column Scale. More...
 
PString ColumnName (PINDEX Column)
 Column Name. More...
 
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. More...

 
PBoolean IsColumnNullable (PINDEX Column)
 IsColumn Nullable. More...
 
PBoolean IsColumnUpdatable (PINDEX Column)
 IsColumn Updateable ie is not ReadOnly. More...
 
PBoolean IsColumnAutoIndex (PINDEX Column)
 IsColumnAutoIndex (ie don't give default Value) More...
 
- Public Member Functions inherited from PObject
virtual ~PObject ()
 
virtual PObjectClone () 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...
 

Static Public Attributes

Data Conversion Settings
static unsigned int Precision
 Conversion Settings. More...
 
static int MaxCharSize
 Double Real Float Decimal digit rounding def= 4;. More...
 
static PTime::TimeFormat TimeFormat
 Long Data Limit KBytes def = 56; (56 Kbytes) More...
 

Protected Attributes

HSTMT m_hStmt
 Time Format. More...
 
PODBCStmtStmt
 
PODBC::DataSources dbase
 Statement 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...
 

Detailed Description

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

Constructor & Destructor Documentation

PODBCRecord::PODBCRecord ( PODBCStmt hStmt)

Constructor.

PODBCRecord::~PODBCRecord ( )
inline

Deconstructor.

Member Function Documentation

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;.

Member Data Documentation

PODBC::DataSources PODBCRecord::dbase
protected

Statement Class.

HSTMT PODBCRecord::m_hStmt
protected

Time Format.

int PODBCRecord::MaxCharSize
static

Double Real Float Decimal digit rounding def= 4;.

unsigned int PODBCRecord::Precision
static

Conversion Settings.

PODBCStmt* PODBCRecord::Stmt
protected
PTime::TimeFormat PODBCRecord::TimeFormat
static

Long Data Limit KBytes def = 56; (56 Kbytes)


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