library: libRODBC
#include "TODBCStatement.h"

TODBCStatement


class description - header file - source file
viewCVS header - viewCVS source

class TODBCStatement: public TSQLStatement

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
public:
TODBCStatement(const TODBCStatement&)
TODBCStatement(SQLHSTMT stmt, Int_t rowarrsize, Bool_t errout = kTRUE)
virtual~TODBCStatement()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual voidClose(Option_t* = "")
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
virtual voidTObject::Dump() const
virtual voidTSQLStatement::EnableErrorOutput(Bool_t on = kTRUE)
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Bool_tGetBinary(Int_t npar, void*& mem, Long_t& size)
virtual Int_tGetBufferLength() const
virtual Bool_tGetDate(Int_t npar, Int_t& year, Int_t& month, Int_t& day)
virtual Bool_tGetDatime(Int_t npar, Int_t& year, Int_t& month, Int_t& day, Int_t& hour, Int_t& min, Int_t& sec)
Int_tTSQLStatement::GetDay(Int_t)
virtual Double_tGetDouble(Int_t npar)
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual Int_tTSQLStatement::GetErrorCode() const
virtual const char*TSQLStatement::GetErrorMsg() const
virtual const char*GetFieldName(Int_t nfield)
Int_tTSQLStatement::GetHour(Int_t)
virtual const char*TObject::GetIconName() const
virtual Int_tGetInt(Int_t npar)
virtual Long_tGetLong(Int_t npar)
virtual Long64_tGetLong64(Int_t npar)
Int_tTSQLStatement::GetMinute(Int_t)
Int_tTSQLStatement::GetMonth(Int_t)
virtual const char*TObject::GetName() const
virtual Int_tGetNumAffectedRows()
virtual Int_tGetNumFields()
virtual Int_tGetNumParameters()
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Int_tTSQLStatement::GetSecond(Int_t)
virtual const char*GetString(Int_t npar)
virtual Bool_tGetTime(Int_t npar, Int_t& hour, Int_t& min, Int_t& sec)
virtual Bool_tGetTimestamp(Int_t npar, Int_t& year, Int_t& month, Int_t& day, Int_t& hour, Int_t& min, Int_t& sec, Int_t&)
virtual const char*TObject::GetTitle() const
virtual UInt_tGetUInt(Int_t npar)
virtual ULong64_tGetULong64(Int_t npar)
virtual UInt_tTObject::GetUniqueID() const
Int_tTSQLStatement::GetYear(Int_t)
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTSQLStatement::IsError() const
virtual Bool_tTObject::IsFolder() const
virtual Bool_tIsNull(Int_t)
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tNextIteration()
virtual Bool_tNextResultRow()
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TODBCStatement&operator=(const TODBCStatement&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Bool_tProcess()
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
virtual Bool_tSetBinary(Int_t npar, void* mem, Long_t size, Long_t maxsize = 0x1000)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual Bool_tSetDate(Int_t npar, Int_t year, Int_t month, Int_t day)
virtual Bool_tSetDatime(Int_t npar, Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec)
virtual Bool_tSetDouble(Int_t npar, Double_t value)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
virtual Bool_tSetInt(Int_t npar, Int_t value)
virtual Bool_tSetLong(Int_t npar, Long_t value)
virtual Bool_tSetLong64(Int_t npar, Long64_t value)
virtual Bool_tSetNull(Int_t npar)
static voidTObject::SetObjectStat(Bool_t stat)
virtual Bool_tSetString(Int_t npar, const char* value, Int_t maxsize = 256)
virtual Bool_tSetTime(Int_t npar, Int_t hour, Int_t min, Int_t sec)
virtual voidTSQLStatement::SetTimeFormating(const char*)
virtual Bool_tSetTimestamp(Int_t npar, Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec, Int_t frac = 0)
virtual Bool_tSetUInt(Int_t npar, UInt_t value)
virtual Bool_tSetULong64(Int_t npar, ULong64_t value)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Bool_tStoreResult()
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const
protected:
Bool_tBindColumn(Int_t ncol, short sqltype, unsigned int size)
Bool_tBindParam(Int_t n, Int_t type, Int_t size = 1024)
voidTSQLStatement::ClearError()
long doubleConvertToNumeric(Int_t npar)
const char*ConvertToString(Int_t npar)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
Bool_tExtractErrors(short retcode, const char* method)
voidFreeBuffers()
void*GetParAddr(Int_t npar, Int_t roottype = 0, Int_t length = 0)
Bool_tIsParSettMode() const
Bool_tIsResultSet() const
voidTObject::MakeZombie()
voidTSQLStatement::SetError(Int_t code, const char* msg, const char* method = "0")
voidSetNumBuffers(Int_t isize, Int_t ilen)

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
SQLHSTMTfHstmt
Int_tfBufferPreferredSize
TODBCStatement::ODBCBufferRec_t*fBuffer
Int_tfNumBuffers
Int_tfBufferLengthnumber of entries for each parameter/column
Int_tfBufferCounterused to indicate position in buffers
unsigned short*fStatusBuffer
Int_tfWorkingMode1 - setting parameters, 2 - reading results, 0 - unknown
unsigned intfNumParsProcessedcontains number of parameters, affected by last operation
unsigned intfNumRowsFetchedindicates number of fetched rows
ULong64_tfLastResultRowstores values of row number after last fetch operation
Int_tTSQLStatement::fErrorCodeerror code of last operation
TStringTSQLStatement::fErrorMsgerror message of last operation
Bool_tTSQLStatement::fErrorOutenable error output

Class Description


  SQL statement class for ODBC

  See TSQLStatement class documentation for more details

________________________________________________________________________
TODBCStatement(SQLHSTMT stmt, Int_t rowarrsize, Bool_t errout)
constructor
~TODBCStatement()
destructor
void Close(Option_t *)
 Close statement
Bool_t Process()
 process statement
Int_t GetNumAffectedRows()
get number of affected rows
Bool_t StoreResult()
 Store result of statement processing.
 Results set, produced by processing of statement, can be stored, and accessed by
 TODBCStamenet methoods like NextResultRow(), GetInt(), GetLong() and so on.
Int_t GetNumFields()
return number of fields
const char* GetFieldName(Int_t nfield)
return field name
Bool_t NextResultRow()
next result row
Bool_t ExtractErrors(SQLRETURN retcode, const char* method)
 Extract errors, produced by last ODBC function call
Bool_t NextIteration()
run next iteration
Int_t GetNumParameters()
return number of parameters
void SetNumBuffers(Int_t isize, Int_t ilen)
set number of buffers
void FreeBuffers()
 Free allocated buffers
Bool_t BindColumn(Int_t ncol, SQLSMALLINT sqltype, SQLUINTEGER size)
 Bind result column to buffer. Allocate buffer of appropriate type
Bool_t BindParam(Int_t npar, Int_t roottype, Int_t size)
 Bind query parameter with buffer. Creates buffer of appropriate type
void* GetParAddr(Int_t npar, Int_t roottype, Int_t length)
 Get parameter address
long double ConvertToNumeric(Int_t npar)
convert to numeric type
const char* ConvertToString(Int_t npar)
convert to string
Bool_t IsNull(Int_t npar)
 Verifies if field value is NULL
Int_t GetInt(Int_t npar)
get parameter as integer
UInt_t GetUInt(Int_t npar)
get parameter as unsigned integer
Long_t GetLong(Int_t npar)
get parameter as Long_t
Long64_t GetLong64(Int_t npar)
get parameter as Long64_t
ULong64_t GetULong64(Int_t npar)
get parameter as ULong64_t
Double_t GetDouble(Int_t npar)
get parameter as Double_t
const char* GetString(Int_t npar)
get parameter as string
Bool_t GetBinary(Int_t npar, void* &mem, Long_t& size)
 return parameter as binary data 
Bool_t GetDate(Int_t npar, Int_t& year, Int_t& month, Int_t& day)
 return field value as date
Bool_t GetTime(Int_t npar, Int_t& hour, Int_t& min, Int_t& sec)
 return field value as time
Bool_t GetDatime(Int_t npar, Int_t& year, Int_t& month, Int_t& day, Int_t& hour, Int_t& min, Int_t& sec)
 return field value as date & time
Bool_t GetTimestamp(Int_t npar, Int_t& year, Int_t& month, Int_t& day, Int_t& hour, Int_t& min, Int_t& sec, Int_t& frac)
 return field value as time stamp
Bool_t SetNull(Int_t npar)
 Set NULL as parameter value
 If NULL should be set for statement parameter during first iteration,
 one should call before proper Set... method to identify type of argument for
 the future. For instance, if one suppose to have double as type of parameter,
 code should look like:
    stmt->SetDouble(2, 0.);
    stmt->SetNull(2);
Bool_t SetInt(Int_t npar, Int_t value)
set parameter as Int_t
Bool_t SetUInt(Int_t npar, UInt_t value)
set parameter as UInt_t
Bool_t SetLong(Int_t npar, Long_t value)
set parameter as Long_t
Bool_t SetLong64(Int_t npar, Long64_t value)
set parameter as Long64_t
Bool_t SetULong64(Int_t npar, ULong64_t value)
set parameter as ULong64_t
Bool_t SetDouble(Int_t npar, Double_t value)
set parameter as Double_t
Bool_t SetString(Int_t npar, const char* value, Int_t maxsize)
set parameter as string
Bool_t SetBinary(Int_t npar, void* mem, Long_t size, Long_t maxsize)
set parameter value as binary data
Bool_t SetDate(Int_t npar, Int_t year, Int_t month, Int_t day)
 set parameter value as date 
Bool_t SetTime(Int_t npar, Int_t hour, Int_t min, Int_t sec)
 set parameter value as time 
Bool_t SetDatime(Int_t npar, Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec)
 set parameter value as date & time 
Bool_t SetTimestamp(Int_t npar, Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec, Int_t frac)
 set parameter value as timestamp
Bool_t IsParSettMode()
{ return fWorkingMode==1; }
Bool_t IsResultSet()
{ return fWorkingMode==2; }
TODBCStatement(SQLHSTMT stmt, Int_t rowarrsize, Bool_t errout = kTRUE)
Int_t GetBufferLength()
{ return fBufferLength; }

Author: Sergey Linev 6/02/2006
Last update: root/odbc:$Name: $:$Id: TODBCStatement.cxx,v 1.12 2006/12/12 11:29:45 rdm Exp $
Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.