File: DB2Exception.hh

package info (click to toggle)
pdns 2.9.20-8
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 4,640 kB
  • ctags: 3,511
  • sloc: cpp: 24,567; sh: 17,754; makefile: 360; yacc: 189; lex: 131; sql: 69; perl: 39
file content (31 lines) | stat: -rw-r--r-- 661 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// $Id: DB2Exception.hh 477 2005-09-03 18:15:37Z ahu $

#ifndef DB2EXCEPTION_HH
#define DB2EXCEPTION_HH

#include <string>

using namespace std;

#include <sqlcli1.h>

class DB2Exception
{
   public:

      DB2Exception(SQLRETURN inError);
      DB2Exception(SQLRETURN inError, SQLSMALLINT inHandleType, SQLHANDLE inHandle);
      virtual ~DB2Exception();

      SQLRETURN GetError();      
      bool GetNextSqlError(int& outNativeError, string& outSqlState, string& outSqlMessage);

   private:
            
      SQLRETURN   mError;
      SQLHANDLE   mHandle;
      SQLSMALLINT mHandleType;
      SQLSMALLINT mErrorIndex;
};
      
#endif // DB2EXCEPTION_HH