Unicode build fixes for GTK not knowing what SQL_WCHAR and SQL_WVARCHAR are in non-unicode builds
Removed old commented out code that is not needed (cleanup) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -755,7 +755,6 @@ bool wxDbTable::Open(bool checkPrivileges, bool checkTableExists)
|
|||||||
int i;
|
int i;
|
||||||
wxString sqlStmt;
|
wxString sqlStmt;
|
||||||
wxString s;
|
wxString s;
|
||||||
// int NumKeyCols=0;
|
|
||||||
|
|
||||||
// Calculate the maximum size of the concatenated
|
// Calculate the maximum size of the concatenated
|
||||||
// keys for use with wxDbGrid
|
// keys for use with wxDbGrid
|
||||||
@@ -764,7 +763,6 @@ bool wxDbTable::Open(bool checkPrivileges, bool checkTableExists)
|
|||||||
{
|
{
|
||||||
if (colDefs[i].KeyField)
|
if (colDefs[i].KeyField)
|
||||||
{
|
{
|
||||||
// NumKeyCols++;
|
|
||||||
m_keysize += colDefs[i].SzDataObj;
|
m_keysize += colDefs[i].SzDataObj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -852,7 +850,6 @@ bool wxDbTable::Open(bool checkPrivileges, bool checkTableExists)
|
|||||||
if (needComma)
|
if (needComma)
|
||||||
sqlStmt += wxT(",");
|
sqlStmt += wxT(",");
|
||||||
sqlStmt += pDb->SQLColumnName(colDefs[i].ColName);
|
sqlStmt += pDb->SQLColumnName(colDefs[i].ColName);
|
||||||
// sqlStmt += colDefs[i].ColName;
|
|
||||||
needComma = true;
|
needComma = true;
|
||||||
}
|
}
|
||||||
needComma = false;
|
needComma = false;
|
||||||
@@ -1103,7 +1100,6 @@ void wxDbTable::BuildSelectStmt(wxString &pSqlStmt, int typeOfSelect, bool disti
|
|||||||
{
|
{
|
||||||
pSqlStmt += wxT(",");
|
pSqlStmt += wxT(",");
|
||||||
pSqlStmt += pDb->SQLTableName(queryTableName);
|
pSqlStmt += pDb->SQLTableName(queryTableName);
|
||||||
// pSqlStmt += queryTableName;
|
|
||||||
pSqlStmt += wxT(".ROWID");
|
pSqlStmt += wxT(".ROWID");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2714,8 +2710,14 @@ wxVariant wxDbTable::GetColumn(const int colNumber) const
|
|||||||
{
|
{
|
||||||
switch (colDefs[colNumber].SqlCtype)
|
switch (colDefs[colNumber].SqlCtype)
|
||||||
{
|
{
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
#if defined(SQL_WCHAR)
|
||||||
case SQL_WCHAR:
|
case SQL_WCHAR:
|
||||||
|
#endif
|
||||||
|
#if defined(SQL_WVARCHAR)
|
||||||
case SQL_WVARCHAR:
|
case SQL_WVARCHAR:
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
case SQL_CHAR:
|
case SQL_CHAR:
|
||||||
case SQL_VARCHAR:
|
case SQL_VARCHAR:
|
||||||
val = (wxChar *)(colDefs[colNumber].PtrDataObj);
|
val = (wxChar *)(colDefs[colNumber].PtrDataObj);
|
||||||
@@ -2780,8 +2782,14 @@ void wxDbTable::SetColumn(const int colNumber, const wxVariant val)
|
|||||||
|
|
||||||
switch (colDefs[colNumber].SqlCtype)
|
switch (colDefs[colNumber].SqlCtype)
|
||||||
{
|
{
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
#if defined(SQL_WCHAR)
|
||||||
case SQL_WCHAR:
|
case SQL_WCHAR:
|
||||||
|
#endif
|
||||||
|
#if defined(SQL_WVARCHAR)
|
||||||
case SQL_WVARCHAR:
|
case SQL_WVARCHAR:
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
case SQL_CHAR:
|
case SQL_CHAR:
|
||||||
case SQL_VARCHAR:
|
case SQL_VARCHAR:
|
||||||
csstrncpyt((wxChar *)(colDefs[colNumber].PtrDataObj),
|
csstrncpyt((wxChar *)(colDefs[colNumber].PtrDataObj),
|
||||||
|
Reference in New Issue
Block a user