]> git.saurik.com Git - wxWidgets.git/commitdiff
Use of blobs with a binding to a SQL_C_BINARY type column definition was not working...
authorGeorge Tasker <gtasker@allenbrook.com>
Wed, 12 May 2004 14:22:25 +0000 (14:22 +0000)
committerGeorge Tasker <gtasker@allenbrook.com>
Wed, 12 May 2004 14:22:25 +0000 (14:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dbtable.cpp

index c5482f8a694e14fd559d1f9e105b34ae2d67561e..bf070f954e78b591991f7c0122239e64e62262c3 100644 (file)
@@ -489,6 +489,11 @@ bool wxDbTable::bindParams(bool forUpdate)
                 if (colDefs[i].Null)
                     colDefs[i].CbValue = SQL_NULL_DATA;
                 else
+                    if (colDefs[i].SqlCtype == SQL_C_BINARY)
+                        colDefs[i].CbValue = 0;
+                    else if (colDefs[i].SqlCtype == SQL_C_CHAR)
+                        colDefs[i].CbValue = SQL_LEN_DATA_AT_EXEC(0);
+                    else
                     colDefs[i].CbValue = SQL_LEN_DATA_AT_EXEC(colDefs[i].SzDataObj);
                 break;
         }