Commit 618ce65a authored by Olivier Bertrand's avatar Olivier Bertrand

Modification of the DBX class to have more information

 in case of error while processing ODBC type tables.

Modified:
odbconn.h
odbconn.cpp
parent df1dfcff
This diff is collapsed.
......@@ -83,20 +83,23 @@ class DBX : public BLOCK {
friend class ODBConn;
// Construction (by ThrowDBX only) -- destruction
protected:
DBX(RETCODE rc);
DBX(RETCODE rc, PSZ msg = NULL);
public:
//virtual ~DBX() {}
//void operator delete(void*, PGLOBAL, void*) {};
// Implementation (use ThrowDBX to create)
RETCODE GetRC(void) {return m_RC;}
PSZ GetMsg(void) {return m_Msg;}
const char *GetErrorMessage(int i)
{ return (i >=0 && i < MAX_NUM_OF_MSG) ? m_ErrMsg[i] : "No ODBC error"; }
{return (i >=0 && i < MAX_NUM_OF_MSG) ? m_ErrMsg[i] : "No ODBC error";}
protected:
void BuildErrorMessage(ODBConn* pdb, HSTMT hstmt = SQL_NULL_HSTMT);
// Attributes
RETCODE m_RC;
PSZ m_Msg;
PSZ m_ErrMsg[MAX_NUM_OF_MSG];
}; // end of DBX class definition
......@@ -156,7 +159,7 @@ class ODBConn : public BLOCK {
// ODBC operations
protected:
bool Check(RETCODE rc);
void ThrowDBX(RETCODE rc, HSTMT hstmt = SQL_NULL_HSTMT);
void ThrowDBX(RETCODE rc, PSZ msg, HSTMT hstmt = SQL_NULL_HSTMT);
void ThrowDBX(PSZ msg);
void AllocConnect(DWORD dwOptions);
bool Connect(DWORD Options);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment