Main | License | Installation | FAQ | Screenshots | Contact | Links | Sf.net | Freshmeat.net | KDE-Apps.org
Requirements | Design | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

odbcWrap.hpp File Reference

#include "include.hpp"
#include <sql.h>
#include "error.hpp"

Go to the source code of this file.

Functions

void odbcWrap (SQLRETURN success, SQLSMALLINT handleType, SQLHANDLE handle) throw (Error)


Function Documentation

void odbcWrap ( SQLRETURN  success,
SQLSMALLINT  handleType,
SQLHANDLE  handle 
) throw (Error)

Extract error information, if method call was unsuccessful.

Deprecated:
{The ODBC classes are not in use at the moment}
Date:
Sat Mar 05 2005
Author:
Jan Wedekind (wedesoft@users.sourceforge.net)

Definition at line 21 of file odbcWrap.cpp.

References ERRORMACRO.

00023 {
00024   if ( !SQL_SUCCEEDED( success ) ) {
00025     if ( handleType != SQL_NULL_HANDLE ) {
00026       SQLCHAR sqlStatus[10];
00027       SQLINTEGER error;
00028       SQLSMALLINT length;
00029       SQLCHAR message[4096];
00030       SQLGetDiagRec( handleType, handle, 1, sqlStatus, &error, message,
00031                      sizeof(message), &length );
00032 #ifndef NDEBUG
00033       cerr << (const char *)&message << endl;
00034 #endif
00035       ERRORMACRO( false, Error, , "Could not allocate ODBC handle: "
00036                   << (const char *)&message );
00037     } else
00038       ERRORMACRO( false, Error, , "Error allocating ODBC handle" );
00039   };  
00040 }



anymeal 0.30 - recipe management software - Make the most of your food! - © Jan Wedekind Sun Sep 14 16:01:27 2008 - GNU Free Documentation License