Applied patch [ 1183157 ] Compilation with GCC 4.0
by Michal Cihar. Also added typedef for SQLINTEGER in built-in iODBC. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
2cbe2aead9
commit
c497d0b212
@ -613,7 +613,7 @@ public:
|
||||
wxChar errorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN];
|
||||
#endif
|
||||
wxChar errorMsg[SQL_MAX_MESSAGE_LENGTH];
|
||||
SDWORD nativeError;
|
||||
SQLINTEGER nativeError;
|
||||
wxChar sqlState[20];
|
||||
|
||||
#if wxODBC_BACKWARD_COMPATABILITY
|
||||
|
@ -1790,11 +1790,7 @@ bool wxDb::DispAllErrors(HENV aHenv, HDBC aHdbc, HSTMT aHstmt)
|
||||
{
|
||||
wxString odbcErrMsg;
|
||||
|
||||
#ifdef __VMS
|
||||
while (SQLError(aHenv, aHdbc, aHstmt, (SQLTCHAR FAR *) sqlState, (SQLINTEGER *) &nativeError, (SQLTCHAR FAR *) errorMsg, SQL_MAX_MESSAGE_LENGTH - 1, &cbErrorMsg) == SQL_SUCCESS)
|
||||
#else
|
||||
while (SQLError(aHenv, aHdbc, aHstmt, (SQLTCHAR FAR *) sqlState, (long*) &nativeError, (SQLTCHAR FAR *) errorMsg, SQL_MAX_MESSAGE_LENGTH - 1, &cbErrorMsg) == SQL_SUCCESS)
|
||||
#endif
|
||||
while (SQLError(aHenv, aHdbc, aHstmt, (SQLTCHAR FAR *) sqlState, &nativeError, (SQLTCHAR FAR *) errorMsg, SQL_MAX_MESSAGE_LENGTH - 1, &cbErrorMsg) == SQL_SUCCESS)
|
||||
{
|
||||
odbcErrMsg.Printf(wxT("SQL State = %s\nNative Error Code = %li\nError Message = %s\n"), sqlState, nativeError, errorMsg);
|
||||
logError(odbcErrMsg, sqlState);
|
||||
@ -1821,11 +1817,7 @@ bool wxDb::DispAllErrors(HENV aHenv, HDBC aHdbc, HSTMT aHstmt)
|
||||
/********** wxDb::GetNextError() **********/
|
||||
bool wxDb::GetNextError(HENV aHenv, HDBC aHdbc, HSTMT aHstmt)
|
||||
{
|
||||
#ifdef __VMS
|
||||
if (SQLError(aHenv, aHdbc, aHstmt, (SQLTCHAR FAR *) sqlState, (SQLINTEGER *) &nativeError, (SQLTCHAR FAR *) errorMsg, SQL_MAX_MESSAGE_LENGTH - 1, &cbErrorMsg) == SQL_SUCCESS)
|
||||
#else
|
||||
if (SQLError(aHenv, aHdbc, aHstmt, (SQLTCHAR FAR *) sqlState, (long*) &nativeError, (SQLTCHAR FAR *) errorMsg, SQL_MAX_MESSAGE_LENGTH - 1, &cbErrorMsg) == SQL_SUCCESS)
|
||||
#endif
|
||||
if (SQLError(aHenv, aHdbc, aHstmt, (SQLTCHAR FAR *) sqlState, &nativeError, (SQLTCHAR FAR *) errorMsg, SQL_MAX_MESSAGE_LENGTH - 1, &cbErrorMsg) == SQL_SUCCESS)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
@ -6,8 +6,8 @@
|
||||
* iODBC defines
|
||||
*
|
||||
* The iODBC driver manager.
|
||||
*
|
||||
* Copyright (C) 1995 by Ke Jin <kejin@empress.com>
|
||||
*
|
||||
* Copyright (C) 1995 by Ke Jin <kejin@empress.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
@ -47,6 +47,7 @@ typedef long int SDWORD;
|
||||
typedef short int SWORD;
|
||||
typedef unsigned long int UDWORD;
|
||||
typedef unsigned short int UWORD;
|
||||
typedef long SQLINTEGER;
|
||||
|
||||
typedef void FAR *PTR;
|
||||
typedef void FAR *HENV;
|
||||
|
Loading…
Reference in New Issue
Block a user