int i;
wxString sqlStmt;
wxString s;
-// int NumKeyCols=0;
// Calculate the maximum size of the concatenated
// keys for use with wxDbGrid
{
if (colDefs[i].KeyField)
{
-// NumKeyCols++;
m_keysize += colDefs[i].SzDataObj;
}
}
if (needComma)
sqlStmt += wxT(",");
sqlStmt += pDb->SQLColumnName(colDefs[i].ColName);
-// sqlStmt += colDefs[i].ColName;
needComma = true;
}
needComma = false;
{
pSqlStmt += wxT(",");
pSqlStmt += pDb->SQLTableName(queryTableName);
-// pSqlStmt += queryTableName;
pSqlStmt += wxT(".ROWID");
}
else
switch(colDefs[colNumber].SqlCtype)
{
case SQL_C_CHAR:
-#ifndef __UNIX__
+#ifdef SQL_C_WCHAR
case SQL_C_WCHAR:
#endif
//case SQL_C_WXCHAR: SQL_C_WXCHAR is covered by either SQL_C_CHAR or SQL_C_WCHAR
(pDb->Dbms() == dbmsSYBASE_ASE && !wxStrcmp(pDb->sqlState,wxT("37000"))) ||
(pDb->Dbms() == dbmsMS_SQL_SERVER && !wxStrcmp(pDb->sqlState,wxT("S1000"))) ||
(pDb->Dbms() == dbmsINTERBASE && !wxStrcmp(pDb->sqlState,wxT("S1000"))) ||
+ (pDb->Dbms() == dbmsMAXDB && !wxStrcmp(pDb->sqlState,wxT("S1000"))) ||
(pDb->Dbms() == dbmsFIREBIRD && !wxStrcmp(pDb->sqlState,wxT("HY000"))) ||
(pDb->Dbms() == dbmsSYBASE_ASE && !wxStrcmp(pDb->sqlState,wxT("S0002"))) || // Base table not found
(pDb->Dbms() == dbmsMY_SQL && !wxStrcmp(pDb->sqlState,wxT("42S12"))) || // tested by Christopher Ludwik Marino-Cebulski using v3.23.21beta
switch(colDefs[colNumber].SqlCtype)
{
case SQL_C_CHAR:
-#ifndef __UNIX__
+#ifdef SQL_C_WCHAR
case SQL_C_WCHAR:
#endif
//case SQL_C_WXCHAR: SQL_C_WXCHAR is covered by either SQL_C_CHAR or SQL_C_WCHAR
{
switch (colDefs[colNumber].SqlCtype)
{
+#if wxUSE_UNICODE
+ #if defined(SQL_WCHAR)
case SQL_WCHAR:
+ #endif
+ #if defined(SQL_WVARCHAR)
case SQL_WVARCHAR:
+ #endif
+#endif
case SQL_CHAR:
case SQL_VARCHAR:
val = (wxChar *)(colDefs[colNumber].PtrDataObj);
switch (colDefs[colNumber].SqlCtype)
{
+#if wxUSE_UNICODE
+ #if defined(SQL_WCHAR)
case SQL_WCHAR:
+ #endif
+ #if defined(SQL_WVARCHAR)
case SQL_WVARCHAR:
+ #endif
+#endif
case SQL_CHAR:
case SQL_VARCHAR:
csstrncpyt((wxChar *)(colDefs[colNumber].PtrDataObj),