some warnings fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
1457c9030c
commit
da38429d93
@ -2082,12 +2082,15 @@ void wxDbTable::SetColDefs(UWORD index, const wxString &fieldName, int dataType,
|
||||
|
||||
if (fieldName.Length() > (unsigned int) DB_MAX_COLUMN_NAME_LEN)
|
||||
{
|
||||
int assertColumnNameTooLong = 0;
|
||||
wxStrncpy(colDefs[index].ColName, fieldName, DB_MAX_COLUMN_NAME_LEN);
|
||||
colDefs[index].ColName[DB_MAX_COLUMN_NAME_LEN] = 0;
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
wxString tmpMsg;
|
||||
tmpMsg.Printf("Column name '%s' is too long. Truncated to '%s'.",fieldName.c_str(),colDefs[index].ColName);
|
||||
wxASSERT_MSG(assertColumnNameTooLong,tmpMsg.c_str());
|
||||
tmpMsg.Printf(_T("Column name '%s' is too long. Truncated to '%s'."),
|
||||
fieldName.c_str(),colDefs[index].ColName);
|
||||
wxFAIL_MSG(tmpMsg);
|
||||
#endif // __WXDEBUG__
|
||||
}
|
||||
else
|
||||
wxStrcpy(colDefs[index].ColName, fieldName);
|
||||
@ -2173,8 +2176,7 @@ wxDbColDataPtr* wxDbTable::SetColDefs(wxDbColInf *pColInfs, UWORD numCols)
|
||||
pColDataPtrs[index].SqlCtype = SQL_C_TIMESTAMP;
|
||||
break;
|
||||
case DB_DATA_TYPE_BLOB:
|
||||
int notSupportedYet = 0;
|
||||
wxASSERT_MSG(notSupportedYet, wxT("This form of ::SetColDefs() cannot be used with BLOB columns"));
|
||||
wxFAIL_MSG(wxT("This form of ::SetColDefs() cannot be used with BLOB columns"));
|
||||
pColDataPtrs[index].PtrDataObj = /*BLOB ADDITION NEEDED*/NULL;
|
||||
pColDataPtrs[index].SzDataObj = /*BLOB ADDITION NEEDED*/sizeof(void *);
|
||||
pColDataPtrs[index].SqlCtype = SQL_VARBINARY;
|
||||
|
Loading…
Reference in New Issue
Block a user