Logo ROOT   6.16/01
Reference Guide
TSapDBResult.h
Go to the documentation of this file.
1// @(#)root/sapdb:$Id$
2// Author: Mark Hemberger & Fons Rademakers 03/08/2001
3
4/*************************************************************************
5 * Copyright (C) 1995-2001, 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_TSapDBResult
13#define ROOT_TSapDBResult
14
15#include "TSQLResult.h"
16
17#if !defined(__CINT__)
18#include <sys/time.h>
19#include <WINDOWS.H>
20#ifdef min
21#undef min
22#endif
23#ifdef max
24#undef max
25#endif
26#include <sql.h>
27#include <sqlext.h>
28#else
29typedef long int SDWORD;
30typedef long SQLHSTMT;
31#endif
32
33class TString;
34
35
36class TSapDBResult : public TSQLResult {
37
38private:
39 SQLHSTMT fResult; // query result (rows)
40 TString *fFieldNames; // names of fields
41 Int_t fFieldCount; // number of fields
42
43 Bool_t IsValid(Int_t field);
44
45public:
46 TSapDBResult(SQLHSTMT fStmt, SDWORD rowCount = 0);
48
49 void Close(Option_t *opt="");
51 const char *GetFieldName(Int_t field);
52 TSQLRow *Next();
53
54 ClassDef(TSapDBResult,0) // SapDB query result
55};
56
57#endif
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:324
TSQLRow * Next()
Get next query result row.
Int_t GetFieldCount()
Get number of fields in result.
TSapDBResult(SQLHSTMT fStmt, SDWORD rowCount=0)
SapDB query result.
Bool_t IsValid(Int_t field)
Check if result set is open and field index within range.
Int_t fFieldCount
Definition: TSapDBResult.h:41
SQLHSTMT fResult
Definition: TSapDBResult.h:39
TString * fFieldNames
Definition: TSapDBResult.h:40
const char * GetFieldName(Int_t field)
Get name of specified field.
~TSapDBResult()
Cleanup SapDB query result.
void Close(Option_t *opt="")
Close query result.
Basic string class.
Definition: TString.h:131