X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9199e66fb56bc80b81b91f59250df78d7197052e..7b9da2077d0975db6c965a85c91d5aca671ab5e3:/src/common/dbtable.cpp?ds=inline diff --git a/src/common/dbtable.cpp b/src/common/dbtable.cpp index 3a11833ad8..51ff59a1a2 100644 --- a/src/common/dbtable.cpp +++ b/src/common/dbtable.cpp @@ -95,7 +95,7 @@ ULONG lastTableID = 0; -#if __WXDEBUG__ > 0 +#ifdef __WXDEBUG__ wxList TablesInUse; #endif @@ -144,7 +144,7 @@ wxTable::wxTable(wxDB *pwxDB, const char *tblName, const int nCols, tableID = ++lastTableID; sprintf(s, "wxTable constructor (%-20s) tableID:[%6lu] pDb:[%p]", tblName,tableID,pDb); -#if __WXDEBUG__ > 0 +#ifdef __WXDEBUG__ CstructTablesInUse *tableInUse; tableInUse = new CstructTablesInUse(); tableInUse->tableName = tblName; @@ -250,8 +250,7 @@ wxTable::~wxTable() pDb->WriteSqlLog(s); } -#ifndef PROGRAM_FP4UPG -#if __WXDEBUG__ > 0 +#ifdef __WXDEBUG__ if (tableID) { bool found = FALSE; @@ -276,7 +275,7 @@ wxTable::~wxTable() } } #endif -#endif + // Decrement the wxDB table count if (pDb) pDb->nTables--; @@ -566,12 +565,15 @@ bool wxTable::getRec(UWORD fetchType) { RETCODE retcode; -#if wxODBC_FWD_ONLY_CURSORS +#if !wxODBC_FWD_ONLY_CURSORS // Fetch the NEXT, PREV, FIRST or LAST record, depending on fetchType UDWORD cRowsFetched; UWORD rowStatus; - if ((retcode = SQLExtendedFetch(hstmt, fetchType, 0, &cRowsFetched, &rowStatus)) != SQL_SUCCESS) + +// if ((retcode = SQLExtendedFetch(hstmt, fetchType, 0, &cRowsFetched, &rowStatus)) != SQL_SUCCESS) + retcode = SQLExtendedFetch(hstmt, fetchType, 0, &cRowsFetched, &rowStatus); + if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO) if (retcode == SQL_NO_DATA_FOUND) return(FALSE); else