library: libRODBC
#include "TODBCStatement.h"

TODBCStatement


class description - header file - source file - inheritance tree (.pdf)

class TODBCStatement : public TSQLStatement

Inheritance Chart:
TObject
<-
TSQLStatement
<-
TODBCStatement

    protected:
Bool_t BindColumn(Int_t ncol, short sqltype, unsigned int size) Bool_t BindParam(Int_t n, Int_t type, Int_t size = 1024) long double ConvertToNumeric(Int_t npar) const char* ConvertToString(Int_t npar) Bool_t ExtractErrors(short retcode, const char* method) void FreeBuffers() void* GetParAddr(Int_t npar, Int_t roottype = 0, Int_t length = 0) Bool_t IsParSettMode() const Bool_t IsResultSet() const void SetNumBuffers(Int_t isize, Int_t ilen) public:
TODBCStatement(SQLHSTMT stmt, Int_t rowarrsize, Bool_t errout = kTRUE) TODBCStatement(const TODBCStatement&) virtual ~TODBCStatement() static TClass* Class() virtual void Close(Option_t* = "") virtual Int_t GetBufferLength() const virtual Double_t GetDouble(Int_t npar) virtual const char* GetFieldName(Int_t nfield) virtual Int_t GetInt(Int_t npar) virtual Long_t GetLong(Int_t npar) virtual Long64_t GetLong64(Int_t npar) virtual Int_t GetNumAffectedRows() virtual Int_t GetNumFields() virtual Int_t GetNumParameters() virtual const char* GetString(Int_t npar) virtual UInt_t GetUInt(Int_t npar) virtual ULong64_t GetULong64(Int_t npar) virtual TClass* IsA() const virtual Bool_t IsNull(Int_t) virtual Bool_t NextIteration() virtual Bool_t NextResultRow() TODBCStatement& operator=(const TODBCStatement&) virtual Bool_t Process() virtual Bool_t SetDouble(Int_t npar, Double_t value) virtual Bool_t SetInt(Int_t npar, Int_t value) virtual Bool_t SetLong(Int_t npar, Long_t value) virtual Bool_t SetLong64(Int_t npar, Long64_t value) virtual Bool_t SetNull(Int_t npar) virtual Bool_t SetString(Int_t npar, const char* value, Int_t maxsize = 256) virtual Bool_t SetUInt(Int_t npar, UInt_t value) virtual Bool_t SetULong64(Int_t npar, ULong64_t value) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual Bool_t StoreResult() virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
SQLHSTMT fHstmt Int_t fBufferPreferredSize TODBCStatement::ODBCBufferRec_t* fBuffer Int_t fNumBuffers Int_t fBufferLength number of entries for each parameter/column Int_t fBufferCounter used to indicate position in buffers unsigned short* fStatusBuffer Int_t fWorkingMode 1 - setting parameters, 2 - reading results, 0 - unknown unsigned int fNumParsProcessed contains number of parameters, affected by last operation unsigned int fNumRowsFetched indicates number of fetched rows

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 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 IsParSettMode()
Bool_t IsResultSet()
TODBCStatement(SQLHSTMT stmt, Int_t rowarrsize, Bool_t errout = kTRUE)
Int_t GetBufferLength()

Author: Sergey Linev 6/02/2006
Last update: root/odbc:$Name: $:$Id: TODBCStatement.cxx,v 1.9 2006/06/25 18:43:24 brun 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.