]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed reversed logic on wxODBC_FWD_ONLY_CURSORS.
authorGeorge Tasker <gtasker@allenbrook.com>
Mon, 8 Nov 1999 15:09:47 +0000 (15:09 +0000)
committerGeorge Tasker <gtasker@allenbrook.com>
Mon, 8 Nov 1999 15:09:47 +0000 (15:09 +0000)
getRec now will return as successful if the result was SQL_SUCCESS_WITH_INFO

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dbtable.cpp

index 3a11833ad83f36188f1602668121a91347031fd7..1381c8ff74961b02bc76d525e009566599a6a9bf 100644 (file)
@@ -566,12 +566,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