fintp_udal
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ODBCDatabase.cpp File Reference
#include "ODBCDatabase.h"
#include "ODBCDatabaseProvider.h"
#include "StringUtil.h"
#include "Trace.h"
#include "Base64.h"
#include <iostream>
#include <exception>
#include <sstream>
#include <unistd.h>

Macros

#define ALLOC_ODBC_HANDLE(odbc_handle, odbc_handle_name, odbc_handle_type, odbc_input_handle, odbc_input_handle_type)
 
#define FREE_ODBC_HANDLE(odbc_handle, odbc_handle_name, odbc_handle_type, odbc_input_handle, odbc_input_handle_type)
 

Macro Definition Documentation

#define ALLOC_ODBC_HANDLE (   odbc_handle,
  odbc_handle_name,
  odbc_handle_type,
  odbc_input_handle,
  odbc_input_handle_type 
)
Value:
{\
DEBUG2( "Allocating " << odbc_handle_name << " handle ..." );\
SQLRETURN odbc_alloc_status = SQLAllocHandle( ( odbc_handle_type ), ( odbc_input_handle ), &( odbc_handle ) );\
if ( odbc_alloc_status != SQL_SUCCESS )\
{\
stringstream odbc_alloc_message; \
odbc_alloc_message << "Alloc [" << odbc_handle_name << "] handle failed [" << getErrorInformation( ( odbc_input_handle_type ), ( odbc_input_handle ) ) << "]";\
TRACE( odbc_alloc_message.str() );\
throw runtime_error( odbc_alloc_message.str() );\
}\
}
#define FREE_ODBC_HANDLE (   odbc_handle,
  odbc_handle_name,
  odbc_handle_type,
  odbc_input_handle,
  odbc_input_handle_type 
)
Value:
{\
DEBUG2( "Freeing " << odbc_handle_name << " handle ..." );\
SQLRETURN odbc_free_status = SQLFreeHandle( ( odbc_handle_type ), ( odbc_handle ) );\
if ( odbc_free_status != SQL_SUCCESS )\
{\
stringstream odbc_free_message; \
odbc_free_message << "Free [" << odbc_handle_name << "] handle failed [" << getErrorInformation( ( odbc_input_handle_type ), ( odbc_input_handle ) ) << "]";\
TRACE( odbc_free_message.str() );\
}\
}