From: George Tasker Date: Thu, 13 May 2004 02:04:51 +0000 (+0000) Subject: BLOB fix - if the type for the BLOB column is SQL_C_CHAR, CbValue is now set to SQL_N... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/fd9b9198f8b180914e05c7fcb8b6779587b4e667 BLOB fix - if the type for the BLOB column is SQL_C_CHAR, CbValue is now set to SQL_NTS to indicate that the data is null terminated. It is strongly recommended to use SQL_C_BINARY for the BLOB type, not SQL_C_CHAR git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/dbtable.cpp b/src/common/dbtable.cpp index 03cedf85f3..5db3049439 100644 --- a/src/common/dbtable.cpp +++ b/src/common/dbtable.cpp @@ -443,7 +443,7 @@ void wxDbTable::setCbValueForColumn(int columnIndex) colDefs[columnIndex].CbValue = SQL_NULL_DATA; else if (colDefs[columnIndex].SqlCtype == SQL_C_CHAR) - colDefs[columnIndex].CbValue = SQL_LEN_DATA_AT_EXEC(0); + colDefs[columnIndex].CbValue = SQL_NTS; else colDefs[columnIndex].CbValue = SQL_LEN_DATA_AT_EXEC(colDefs[columnIndex].SzDataObj); break;