X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ff294e0ebadec5896402cafcbd8d9b36a61f98af..757cc9def70e4685054f4a24238e2df111f6c9fd:/src/common/dbtable.cpp?ds=sidebyside diff --git a/src/common/dbtable.cpp b/src/common/dbtable.cpp index e11ff65602..49e2c2348d 100644 --- a/src/common/dbtable.cpp +++ b/src/common/dbtable.cpp @@ -528,15 +528,16 @@ bool wxDbTable::bindUpdateParams(void) /********** wxDbTable::bindCols() **********/ bool wxDbTable::bindCols(HSTMT cursor) { + static SDWORD cb; + // Bind each column of the table to a memory address for fetching data UWORD i; for (i = 0; i < noCols; i++) { + cb = colDefs[i].CbValue; if (SQLBindCol(cursor, (UWORD)(i+1), colDefs[i].SqlCtype, (UCHAR*) colDefs[i].PtrDataObj, - colDefs[i].SzDataObj, &colDefs[i].CbValue ) != SQL_SUCCESS) - { + colDefs[i].SzDataObj, &cb ) != SQL_SUCCESS) return (pDb->DispAllErrors(henv, hdbc, cursor)); - } } // Completed successfully