X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9eb11d19b13870292f3ccd340c67d7e148761db5..4f690a1d5e6192d0861686982e89f9f17a21e679:/src/common/db.cpp diff --git a/src/common/db.cpp b/src/common/db.cpp index 0e99d44d21..5e37eaf860 100644 --- a/src/common/db.cpp +++ b/src/common/db.cpp @@ -1825,7 +1825,8 @@ bool wxDb::DispAllErrors(HENV aHenv, HDBC aHdbc, HSTMT aHstmt) 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); + odbcErrMsg.Printf(wxT("SQL State = %s\nNative Error Code = %li\nError Message = %s\n"), + sqlState, (long)nativeError, errorMsg); logError(odbcErrMsg, sqlState); if (!silent) { @@ -1863,7 +1864,8 @@ void wxDb::DispNextError(void) { wxString odbcErrMsg; - odbcErrMsg.Printf(wxT("SQL State = %s\nNative Error Code = %li\nError Message = %s\n"), sqlState, nativeError, errorMsg); + odbcErrMsg.Printf(wxT("SQL State = %s\nNative Error Code = %li\nError Message = %s\n"), + sqlState, (long)nativeError, errorMsg); logError(odbcErrMsg, sqlState); if (silent) @@ -2304,6 +2306,7 @@ bool wxDb::ExecSql(const wxString &pSqlStmt, wxDbColInf** columns, short& numcol return false; } + pColInf[colNum].sqlDataType = Sqllen; switch (Sqllen) { #if wxUSE_UNICODE