Comments added to acknowledge contributors

Cleanup of commented out blocks that were no longer needed


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
George Tasker
2000-08-05 17:21:17 +00:00
parent 6953221642
commit 77dbcbc141

View File

@@ -3,11 +3,8 @@
// Purpose: Implementation of the wxDbTable class. // Purpose: Implementation of the wxDbTable class.
// Author: Doug Card // Author: Doug Card
// Modified by: George Tasker // Modified by: George Tasker
// Mods: April 1999 // Bart Jourquin
// -Dynamic cursor support - Only one predefined cursor, as many others as // Mark Johnson
// you need may be created on demand
// -Reduced number of active cursors significantly
// -Query-Only wxDbTable objects
// Created: 9.96 // Created: 9.96
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) 1996 Remstar International, Inc. // Copyright: (c) 1996 Remstar International, Inc.
@@ -322,6 +319,7 @@ wxDbTable::~wxDbTable()
pDb->DispAllErrors(henv, hdbc); pDb->DispAllErrors(henv, hdbc);
} }
if (hstmtInternal) if (hstmtInternal)
if (SQLFreeStmt(hstmtInternal, SQL_DROP) != SQL_SUCCESS) if (SQLFreeStmt(hstmtInternal, SQL_DROP) != SQL_SUCCESS)
pDb->DispAllErrors(henv, hdbc); pDb->DispAllErrors(henv, hdbc);
@@ -559,20 +557,6 @@ bool wxDbTable::execUpdate(const char *pSqlStmt)
/********** wxDbTable::query() **********/ /********** wxDbTable::query() **********/
bool wxDbTable::query(int queryType, bool forUpdate, bool distinct, const char *pSqlStmt) bool wxDbTable::query(int queryType, bool forUpdate, bool distinct, const char *pSqlStmt)
{ {
/* SQLFreeStmt(hstmt, SQL_CLOSE);
if (SQLExecDirect(hstmt, (UCHAR FAR *) pSqlStmt, SQL_NTS) == SQL_SUCCESS)
return(TRUE);
else
{
pDb->DispAllErrors(henv, hdbc, hstmt);
return(FALSE);
}
*/
char sqlStmt[DB_MAX_STATEMENT_LEN]; char sqlStmt[DB_MAX_STATEMENT_LEN];
// Set the selectForUpdate member variable // Set the selectForUpdate member variable
@@ -622,6 +606,7 @@ bool wxDbTable::Open(void)
{ {
if (!pDb) if (!pDb)
return FALSE; return FALSE;
int i; int i;
wxString sqlStmt; wxString sqlStmt;
@@ -645,14 +630,13 @@ bool wxDbTable::Open(void)
// the wxDbTable object and the ODBC record. // the wxDbTable object and the ODBC record.
if (!queryOnly) if (!queryOnly)
{ {
if (!bindInsertParams()) // Inserts if (!bindInsertParams()) // Inserts
return(FALSE); return(FALSE);
if (!bindUpdateParams()) // Updates if (!bindUpdateParams()) // Updates
return(FALSE); return(FALSE);
} }
if (!bindCols(*hstmtDefault)) // Selects if (!bindCols(*hstmtDefault)) // Selects
return(FALSE); return(FALSE);
@@ -694,8 +678,6 @@ bool wxDbTable::Open(void)
} }
sqlStmt += ")"; sqlStmt += ")";
// pDb->WriteSqlLog(sqlStmt);
// Prepare the insert statement for execution // Prepare the insert statement for execution
if (insertableCount) if (insertableCount)
{ {
@@ -1977,7 +1959,7 @@ void wxDbTable::SetCursor(HSTMT *hstmtActivate)
/********** wxDbTable::Count(const char *) **********/ /********** wxDbTable::Count(const char *) **********/
ULONG wxDbTable::Count(const char *args) ULONG wxDbTable::Count(const char *args)
{ {
ULONG l; ULONG count;
wxString sqlStmt; wxString sqlStmt;
SDWORD cb; SDWORD cb;
@@ -2030,7 +2012,7 @@ ULONG wxDbTable::Count(const char *args)
} }
// Obtain the result // Obtain the result
if (SQLGetData(*hstmtCount, 1, SQL_C_ULONG, &l, sizeof(l), &cb) != SQL_SUCCESS) if (SQLGetData(*hstmtCount, 1, SQL_C_ULONG, &count, sizeof(count), &cb) != SQL_SUCCESS)
{ {
pDb->DispAllErrors(henv, hdbc, *hstmtCount); pDb->DispAllErrors(henv, hdbc, *hstmtCount);
return(0); return(0);
@@ -2041,7 +2023,7 @@ ULONG wxDbTable::Count(const char *args)
pDb->DispAllErrors(henv, hdbc, *hstmtCount); pDb->DispAllErrors(henv, hdbc, *hstmtCount);
// Return the record count // Return the record count
return(l); return(count);
} // wxDbTable::Count() } // wxDbTable::Count()