Fixed some potentially uninitialized variables
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8762
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
selectForUpdate = FALSE; // SELECT ... FOR UPDATE; Indicates whether to include the FOR UPDATE phrase
queryOnly = qryOnly;
insertable = TRUE;
selectForUpdate = FALSE; // SELECT ... FOR UPDATE; Indicates whether to include the FOR UPDATE phrase
queryOnly = qryOnly;
insertable = TRUE;
+ wxStrcpy(tablePath,"");
+ wxStrcpy(tableName,"");
+ wxStrcpy(queryTableName,"");
BuildSelectStmt(sqlStmt, queryType, distinct);
pDb->WriteSqlLog(sqlStmt);
}
BuildSelectStmt(sqlStmt, queryType, distinct);
pDb->WriteSqlLog(sqlStmt);
}
+/*
+ This is the block of code that got added during the 2.2.1 merge with
+ the 2.2 main branch that somehow got added here when it should not have. - gt
+
else
wxStrcpy(sqlStmt, pSqlStmt);
else
wxStrcpy(sqlStmt, pSqlStmt);
pDb->DispAllErrors(henv, hdbc, hstmt);
return(FALSE);
}
pDb->DispAllErrors(henv, hdbc, hstmt);
return(FALSE);
}
// Make sure the cursor is closed first
// Make sure the cursor is closed first
- if (! CloseCursor(hstmt))
+ if (!CloseCursor(hstmt))
return(FALSE);
// Execute the SQL SELECT statement
return(FALSE);
// Execute the SQL SELECT statement
- if (pDb->Dbms() == dbmsSYBASE_ASE || pDb->Dbms() == dbmsMY_SQL)
+ if (pDb->Dbms() == dbmsDB2 ||
+ pDb->Dbms() == dbmsMY_SQL ||
+ pDb->Dbms() == dbmsSYBASE_ASE ||
+ pDb->Dbms() == dbmsMS_SQL_SERVER)
{
if (colDefs[i].KeyField)
{
{
if (colDefs[i].KeyField)
{
if (pDb->Dbms() == dbmsACCESS || pDb->Dbms() == dbmsMY_SQL)
sqlStmt.sprintf("DROP INDEX %s ON %s",idxName,tableName);
if (pDb->Dbms() == dbmsACCESS || pDb->Dbms() == dbmsMY_SQL)
sqlStmt.sprintf("DROP INDEX %s ON %s",idxName,tableName);
- else if (pDb->Dbms() == dbmsSYBASE_ASE)
+ else if ((pDb->Dbms() == dbmsMS_SQL_SERVER) ||
+ (pDb->Dbms() == dbmsSYBASE_ASE))
sqlStmt.sprintf("DROP INDEX %s.%s",tableName,idxName);
else
sqlStmt.sprintf("DROP INDEX %s",idxName);
sqlStmt.sprintf("DROP INDEX %s.%s",tableName,idxName);
else
sqlStmt.sprintf("DROP INDEX %s",idxName);
if (pDb->Dbms() == dbmsMY_SQL)
return FALSE;
if (pDb->Dbms() == dbmsMY_SQL)
return FALSE;
- if (pDb->dbInf.posStmts & SQL_PS_SELECT_FOR_UPDATE)
+ if ((pDb->Dbms() == dbmsORACLE) ||
+ (pDb->dbInf.posStmts & SQL_PS_SELECT_FOR_UPDATE))
return(TRUE);
else
return(FALSE);
return(TRUE);
else
return(FALSE);
/********** wxDbTable::SetColDefs() **********/
/********** wxDbTable::SetColDefs() **********/
-void wxDbTable::SetColDefs (int index, const char *fieldName, int dataType, void *pData,
- int cType, int size, bool keyField, bool upd,
- bool insAllow, bool derivedCol)
+void wxDbTable::SetColDefs(int index, const char *fieldName, int dataType, void *pData,
+ int cType, int size, bool keyField, bool upd,
+ bool insAllow, bool derivedCol)
{
if (!colDefs) // May happen if the database connection fails
return;
{
if (!colDefs) // May happen if the database connection fails
return;
} // wxDbTable::SetColDefs()
} // wxDbTable::SetColDefs()
-/********** wxDbTable::SetColDef() **********/
-wxDbColDataPtr* wxDbTable::SetColDefs (wxDbColInf *pColInfs, ULONG numCols)
+/********** wxDbTable::SetColDefs() **********/
+wxDbColDataPtr* wxDbTable::SetColDefs(wxDbColInf *pColInfs, ULONG numCols)
{
assert(pColInfs);
wxDbColDataPtr *pColDataPtrs = NULL;
{
assert(pColInfs);
wxDbColDataPtr *pColDataPtrs = NULL;
-} // wxDbTable::SetColDef()
+} // wxDbTable::SetColDefs()
/********** wxDbTable::SetCursor() **********/
/********** wxDbTable::SetCursor() **********/