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 List of all members.

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 data where the size is indetermined.
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 1 Row is deleted.
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 If not found returns column value of 0;.
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).

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.
PODBCStmtStmt
PODBC::DataSources dbase
 Statement Class.

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:
Generated on Fri Oct 14 01:44:12 2011 for PTLib by  doxygen 1.4.7