Go to the documentation of this file.00001
00002
00003
00004
00005
00008
00009 #pragma once
00010
00011 #include "vlDatabase.h"
00012
00013 #ifdef _WIN32
00014 #include <windows.h>
00015 #include <sqltypes.h>
00016 #include <odbcinst.h>
00017 #else
00018 #include <sqltypes.h>
00019 #include <iodbcinst.h>
00020 #endif
00021 #if !defined(_INC_STDIO) && !defined(_STDIO_H)
00022 #include <stdio.h>
00023 #endif
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 class DT_DLL_VLDB DtSqlIfErrorHandler
00036 {
00037 public:
00038
00039 DtSqlIfErrorHandler();
00040
00041
00042 virtual ~DtSqlIfErrorHandler();
00043
00044
00045 virtual void processRetCode(
00046 SQLRETURN retCode, SQLSMALLINT handle_type, SQLHANDLE handle );
00047
00048 static bool SqlSuccess(SQLRETURN rc);
00049 };
00050
00051 inline bool DtSqlIfErrorHandler::SqlSuccess(SQLRETURN rc)
00052 {
00053 return ( (rc == SQL_SUCCESS) || (rc == SQL_SUCCESS_WITH_INFO) );
00054 }