]> git.saurik.com Git - wxWidgets.git/commitdiff
Patch # 984215 - Insert was returning SUCCESS after an error
authorGeorge Tasker <gtasker@allenbrook.com>
Fri, 2 Jul 2004 18:54:15 +0000 (18:54 +0000)
committerGeorge Tasker <gtasker@allenbrook.com>
Fri, 2 Jul 2004 18:54:15 +0000 (18:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dbtable.cpp

index 1657a14c98ccba1f0db00f669bdfcef7e01a43ae..41d19a4d8c80caef7a6851fd82783fb7cc25159e 100644 (file)
@@ -1945,6 +1945,14 @@ int wxDbTable::Insert(void)
                 }
             }
             retcode = SQLParamData(hstmtInsert, &pParmID);
+            if (retcode != SQL_SUCCESS &&
+                retcode != SQL_SUCCESS_WITH_INFO)
+            {
+                // record was not inserted
+                pDb->DispNextError();
+                pDb->DispAllErrors(henv, hdbc, hstmtInsert);
+                return(DB_FAILURE);
+            }
         }
     }