X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ff294e0ebadec5896402cafcbd8d9b36a61f98af..277f2e527e33de039146ab94358ffec9c98f6112:/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