File: DB2Exception.hh

package info (click to toggle)
pdns 2.9.17-13sarge3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,332 kB
  • ctags: 2,682
  • sloc: cpp: 20,168; sh: 16,689; makefile: 475; yacc: 188; lex: 131; sql: 69; perl: 39
file content (31 lines) | stat: -rw-r--r-- 666 bytes parent folder | download
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,v 1.1 2002/11/29 11:44:21 ahu Exp $

#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