use a different indicator when binding parameters and columns (patch 1718474)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-05-24 00:27:40 +00:00
parent d0bc78e2bf
commit d71a2d7863
2 changed files with 6 additions and 4 deletions

View File

@@ -55,8 +55,9 @@ public:
bool Updateable; // Specifies whether this column is updateable
bool InsertAllowed; // Specifies whether this column should be included in an INSERT statement
bool DerivedCol; // Specifies whether this column is a derived value
SQLLEN CbValue; // Internal use only!!!
SQLLEN CbValue; // Internal use only!!! For parameter bindings
bool Null; // NOT FULLY IMPLEMENTED - Allows NULL values in Inserts and Updates
SQLLEN CbValueCol; // Internal use only!!! For column bindings
wxDbColDef();

View File

@@ -87,6 +87,7 @@ bool wxDbColDef::Initialize()
DerivedCol = false;
CbValue = 0;
Null = false;
CbValueCol = 0;
return true;
} // wxDbColDef::Initialize()
@@ -552,7 +553,7 @@ bool wxDbTable::bindCols(HSTMT cursor)
for (i = 0; i < m_numCols; i++)
{
if (SQLBindCol(cursor, (UWORD)(i+1), colDefs[i].SqlCtype, (UCHAR*) colDefs[i].PtrDataObj,
colDefs[i].SzDataObj, &colDefs[i].CbValue ) != SQL_SUCCESS)
colDefs[i].SzDataObj, &colDefs[i].CbValueCol ) != SQL_SUCCESS)
return (pDb->DispAllErrors(henv, hdbc, cursor));
}
@@ -586,7 +587,7 @@ bool wxDbTable::getRec(UWORD fetchType)
// of each column just read in.
int i;
for (i = 0; i < m_numCols; i++)
colDefs[i].Null = (colDefs[i].CbValue == SQL_NULL_DATA);
colDefs[i].Null = (colDefs[i].CbValueCol == SQL_NULL_DATA);
}
}
else
@@ -606,7 +607,7 @@ bool wxDbTable::getRec(UWORD fetchType)
// of each column just read in.
int i;
for (i = 0; i < m_numCols; i++)
colDefs[i].Null = (colDefs[i].CbValue == SQL_NULL_DATA);
colDefs[i].Null = (colDefs[i].CbValueCol == SQL_NULL_DATA);
}
}