git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5569
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void SetColDefs (int index, const char *fieldName, int dataType, void *pData, int cType,
int size, bool keyField = FALSE, bool upd = TRUE,
bool insAllow = TRUE, bool derivedCol = FALSE);
void SetColDefs (int index, const char *fieldName, int dataType, void *pData, int cType,
int size, bool keyField = FALSE, bool upd = TRUE,
bool insAllow = TRUE, bool derivedCol = FALSE);
- bool SetColDefs (wxColInf *colInfs, ULONG numCols, wxColDataPtr *pColDataPtrs);
+ // BJO20000121 : new prototype
+ // bool SetColDefs (wxColInf *colInfs, ULONG numCols, wxColDataPtr *pColDataPtrs);
+ wxColDataPtr* SetColDefs (wxColInf *colInfs, ULONG numCols);
+
HSTMT *NewCursor(bool setCursor = FALSE, bool bindColumns = TRUE);
bool DeleteCursor(HSTMT *hstmtDel);
void SetCursor(HSTMT *hstmtActivate = (void **) DEFAULT_CURSOR);
HSTMT *NewCursor(bool setCursor = FALSE, bool bindColumns = TRUE);
bool DeleteCursor(HSTMT *hstmtDel);
void SetCursor(HSTMT *hstmtActivate = (void **) DEFAULT_CURSOR);
/********** wxTable::SetColDef() **********/
/********** wxTable::SetColDef() **********/
-bool wxTable::SetColDefs(wxColInf *pColInfs, ULONG numCols, wxColDataPtr *pColDataPtrs)
+// BJO20000121 : changed prototype in order to return proper pointer on wxColDataPtr's array
+//bool wxTable::SetColDefs(wxColInf *pColInfs, ULONG numCols, wxColDataPtr *pColDataPtrs)
+wxColDataPtr* wxTable::SetColDefs (wxColInf *pColInfs, ULONG numCols)
+ wxColDataPtr *pColDataPtrs;
if (pColInfs)
{
ULONG index;
if (pColInfs)
{
ULONG index;
- // BJO 991210: This doesn't seem to work. I solved this
- // by allocating memory in the tables ctor:
- //
- // MyTable::MyTable(wxDB *pDB, char *Name, int NbCols, wxColInf *ColInfo):
- // wxTable(pDB, Name, NbCols)
- // {
- // m_FreeDbConn = !pDB;
- // m_DataPtrs = new wxColDataPtr[NbCols];
- // SetColDefs(ColInfo, NbCols, m_DataPtrs);
- // }
pColDataPtrs = new wxColDataPtr[numCols+1];
for (index = 0; index < numCols; index++)
pColDataPtrs = new wxColDataPtr[numCols+1];
for (index = 0; index < numCols; index++)
SetColDefs (index,pColInfs[index].colName,pColInfs[index].dbDataType, pColDataPtrs[index].PtrDataObj, pColDataPtrs[index].SqlCtype, pColDataPtrs[index].SzDataObj);
}
}
SetColDefs (index,pColInfs[index].colName,pColInfs[index].dbDataType, pColDataPtrs[index].PtrDataObj, pColDataPtrs[index].SqlCtype, pColDataPtrs[index].SzDataObj);
}
}
} // wxTable::SetColDef()
} // wxTable::SetColDef()