Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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;
32  Int_t fFieldCount;
33  char **fBuffer;
34  ULong_t *fLengths;
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="");
47  ULong_t GetFieldLength(Int_t field);
48  const char *GetField(Int_t field);
49 
50  ClassDef(TODBCRow,0) // One row of ODBC query result
51 };
52 
53 #endif