Logo ROOT   6.14/05
Reference Guide
TODBCRow.h
Go to the documentation of this file.
1 // @(#)root/odbc:$Id$
2 // Author: Sergey Linev 6/02/2006
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TODBCRow
13 #define ROOT_TODBCRow
14 
15 #include "TSQLRow.h"
16 
17 #include "TString.h"
18 
19 #ifdef __CLING__
20 typedef void * SQLHSTMT;
21 #else
22 #ifdef WIN32
23 #include "windows.h"
24 #endif
25 #include <sql.h>
26 #endif
27 
28 class TODBCRow : public TSQLRow {
29 
30 protected:
31  SQLHSTMT fHstmt;
33  char **fBuffer;
35 
36  void CopyFieldValue(Int_t field);
37 
38 private:
39  TODBCRow(const TODBCRow&); // Not implemented.
40  TODBCRow &operator=(const TODBCRow&); // Not implemented.
41 
42 public:
43  TODBCRow(SQLHSTMT stmt, Int_t fieldcount);
44  virtual ~TODBCRow();
45 
46  void Close(Option_t *opt="");
48  const char *GetField(Int_t field);
49 
50  ClassDef(TODBCRow,0) // One row of ODBC query result
51 };
52 
53 #endif
const char Option_t
Definition: RtypesCore.h:62
SQLHSTMT fHstmt
Definition: TODBCRow.h:31
virtual ~TODBCRow()
Destroy row object.
Definition: TODBCRow.cxx:44
TODBCRow(const TODBCRow &)
void Close(Option_t *opt="")
Close row.
Definition: TODBCRow.cxx:52
int Int_t
Definition: RtypesCore.h:41
Int_t fFieldCount
Definition: TODBCRow.h:32
#define ClassDef(name, id)
Definition: Rtypes.h:320
ULong_t * fLengths
Definition: TODBCRow.h:34
char ** fBuffer
Definition: TODBCRow.h:33
void CopyFieldValue(Int_t field)
Extracts field value from statement.
Definition: TODBCRow.cxx:73
TODBCRow & operator=(const TODBCRow &)
ULong_t GetFieldLength(Int_t field)
Get length in bytes of specified field.
Definition: TODBCRow.cxx:114
unsigned long ULong_t
Definition: RtypesCore.h:51
const char * GetField(Int_t field)
Get specified field from row (0 <= field < GetFieldCount()).
Definition: TODBCRow.cxx:124