Informix fixes (submitted by Roger Gammans)

Added .c_str() to some wxString instances when being Printf()'d into another wxString


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10366 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
George Tasker
2001-05-28 12:24:22 +00:00
parent 9e4d1095ea
commit 597fadcef5

View File

@@ -351,7 +351,7 @@ void wxDbTable::cleanup()
if (!found) if (!found)
{ {
wxString msg; wxString msg;
msg.Printf(wxT("Unable to find the tableID in the linked\nlist of tables in use.\n\n%s"),s); msg.Printf(wxT("Unable to find the tableID in the linked\nlist of tables in use.\n\n%s"),s.c_str());
wxLogDebug (msg,wxT("NOTICE...")); wxLogDebug (msg,wxT("NOTICE..."));
} }
} }
@@ -1404,6 +1404,7 @@ bool wxDbTable::CreateTable(bool attemptDrop)
{ {
switch (pDb->Dbms()) switch (pDb->Dbms())
{ {
case dbmsINFORMIX:
case dbmsSYBASE_ASA: case dbmsSYBASE_ASA:
case dbmsSYBASE_ASE: case dbmsSYBASE_ASE:
case dbmsMY_SQL: case dbmsMY_SQL:
@@ -1441,7 +1442,8 @@ bool wxDbTable::CreateTable(bool attemptDrop)
} }
sqlStmt += wxT(")"); sqlStmt += wxT(")");
if (pDb->Dbms() == dbmsSYBASE_ASA || if (pDb->Dbms() == dbmsINFORMIX ||
pDb->Dbms() == dbmsSYBASE_ASA ||
pDb->Dbms() == dbmsSYBASE_ASE) pDb->Dbms() == dbmsSYBASE_ASE)
{ {
sqlStmt += wxT(" CONSTRAINT "); sqlStmt += wxT(" CONSTRAINT ");
@@ -2091,7 +2093,7 @@ void wxDbTable::SetColDefs(UWORD index, const wxString &fieldName, int dataType,
wxStrncpy(colDefs[index].ColName, fieldName, DB_MAX_COLUMN_NAME_LEN); wxStrncpy(colDefs[index].ColName, fieldName, DB_MAX_COLUMN_NAME_LEN);
colDefs[index].ColName[DB_MAX_COLUMN_NAME_LEN] = 0; colDefs[index].ColName[DB_MAX_COLUMN_NAME_LEN] = 0;
wxString tmpMsg; wxString tmpMsg;
tmpMsg.sprintf("Column name '%s' is too long. Truncated to '%s'.",fieldName,colDefs[index].ColName); tmpMsg.Printf("Column name '%s' is too long. Truncated to '%s'.",fieldName.c_str(),colDefs[index].ColName);
wxASSERT_MSG(assertColumnNameTooLong,tmpMsg.c_str()); wxASSERT_MSG(assertColumnNameTooLong,tmpMsg.c_str());
} }
else else