Logo ROOT   6.07/09
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 #ifndef ROOT_TSQLRow
16 #include "TSQLRow.h"
17 #endif
18 
19 #ifndef ROOT_TString
20 #include "TString.h"
21 #endif
22 
23 #ifdef __CLING__
24 typedef void * SQLHSTMT;
25 #else
26 #ifdef WIN32
27 #include "windows.h"
28 #endif
29 #include <sql.h>
30 #endif
31 
32 class TODBCRow : public TSQLRow {
33 
34 protected:
35  SQLHSTMT fHstmt;
37  char **fBuffer;
39 
40  void CopyFieldValue(Int_t field);
41 
42 private:
43  TODBCRow(const TODBCRow&); // Not implemented.
44  TODBCRow &operator=(const TODBCRow&); // Not implemented.
45 
46 public:
47  TODBCRow(SQLHSTMT stmt, Int_t fieldcount);
48  virtual ~TODBCRow();
49 
50  void Close(Option_t *opt="");
52  const char *GetField(Int_t field);
53 
54  ClassDef(TODBCRow,0) // One row of ODBC query result
55 };
56 
57 #endif
const char Option_t
Definition: RtypesCore.h:62
SQLHSTMT fHstmt
Definition: TODBCRow.h:35
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:36
#define ClassDef(name, id)
Definition: Rtypes.h:254
ULong_t * fLengths
Definition: TODBCRow.h:38
char ** fBuffer
Definition: TODBCRow.h:37
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