Use of blobs with a binding to a SQL_C_BINARY type column definition was not working correctly. The code should now work for SQL_C_BINARY and SQL_C_CHAR column bindings, though I have only tested with SQL_C_BINARY. The original code will be used if the column binding is not SQL_C_BINARY or SQL_C_CHAR

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
George Tasker
2004-05-12 14:22:25 +00:00
parent d2129c82bf
commit 76ea166498

View 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;
}