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:
@@ -55,8 +55,9 @@ public:
|
|||||||
bool Updateable; // Specifies whether this column is updateable
|
bool Updateable; // Specifies whether this column is updateable
|
||||||
bool InsertAllowed; // Specifies whether this column should be included in an INSERT statement
|
bool InsertAllowed; // Specifies whether this column should be included in an INSERT statement
|
||||||
bool DerivedCol; // Specifies whether this column is a derived value
|
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
|
bool Null; // NOT FULLY IMPLEMENTED - Allows NULL values in Inserts and Updates
|
||||||
|
SQLLEN CbValueCol; // Internal use only!!! For column bindings
|
||||||
|
|
||||||
wxDbColDef();
|
wxDbColDef();
|
||||||
|
|
||||||
|
@@ -87,6 +87,7 @@ bool wxDbColDef::Initialize()
|
|||||||
DerivedCol = false;
|
DerivedCol = false;
|
||||||
CbValue = 0;
|
CbValue = 0;
|
||||||
Null = false;
|
Null = false;
|
||||||
|
CbValueCol = 0;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} // wxDbColDef::Initialize()
|
} // wxDbColDef::Initialize()
|
||||||
@@ -552,7 +553,7 @@ bool wxDbTable::bindCols(HSTMT cursor)
|
|||||||
for (i = 0; i < m_numCols; i++)
|
for (i = 0; i < m_numCols; i++)
|
||||||
{
|
{
|
||||||
if (SQLBindCol(cursor, (UWORD)(i+1), colDefs[i].SqlCtype, (UCHAR*) colDefs[i].PtrDataObj,
|
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));
|
return (pDb->DispAllErrors(henv, hdbc, cursor));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -586,7 +587,7 @@ bool wxDbTable::getRec(UWORD fetchType)
|
|||||||
// of each column just read in.
|
// of each column just read in.
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < m_numCols; 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
|
else
|
||||||
@@ -606,7 +607,7 @@ bool wxDbTable::getRec(UWORD fetchType)
|
|||||||
// of each column just read in.
|
// of each column just read in.
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < m_numCols; 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user