From df991b9dfb98e8b65c5c806d96b991f8d6c8f55b Mon Sep 17 00:00:00 2001 From: George Tasker Date: Thu, 16 Mar 2000 19:02:22 +0000 Subject: [PATCH] Modified to use the newly defined names for functions/classes/structs defined to match the wxWindows conventions for naming (primarily prefacing these items with wx). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- demos/dbbrowse/browsedb.cpp | 13 +++++++------ demos/dbbrowse/browsedb.h | 2 +- demos/dbbrowse/doc.cpp | 4 ++-- demos/dbbrowse/doc.h | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/demos/dbbrowse/browsedb.cpp b/demos/dbbrowse/browsedb.cpp index 5a659d131e..cc3506c06f 100644 --- a/demos/dbbrowse/browsedb.cpp +++ b/demos/dbbrowse/browsedb.cpp @@ -32,9 +32,9 @@ //---------------------------------------------------------------------------------------- // Global structure for holding ODBC connection information // - darf nur einmal im Projekte definiert werden ?? Extra Databasse Klasse ? -struct DbStuff ConnectInf; // Für DBase +struct wxDbConnectInf ConnectInf; // Für DBase //---------------------------------------------------------------------------------------- -extern DbList* WXDLLEXPORT PtrBegDbList; /* from db.cpp, used in getting back error results from db connections */ +extern wxDbList* WXDLLEXPORT PtrBegDbList; /* from db.cpp, used in getting back error results from db connections */ //---------------------------------------------------------------------------------------- char *GetExtendedDBErrorMsg(char *ErrFile, int ErrLine) { @@ -53,7 +53,8 @@ char *GetExtendedDBErrorMsg(char *ErrFile, int ErrLine) // msg += "\n"; /* Scan through each database connection displaying * any ODBC errors that have occured. */ - for (DbList *pDbList = PtrBegDbList; pDbList; pDbList = pDbList->PtrNext) + wxDbList *pDbList; + for (pDbList = PtrBegDbList; pDbList; pDbList = pDbList->PtrNext) { // Skip over any free connections if (pDbList->Free) @@ -144,7 +145,7 @@ bool BrowserDB::OnStartDB(int Quite) strcpy(ConnectInf.Dsn, ODBCSource); // ODBC data source name (created with ODBC Administrator under Win95/NT) strcpy(ConnectInf.Uid, UserName); // database username - must already exist in the data source strcpy(ConnectInf.AuthStr, Password); // password database username - db_BrowserDB = GetDbConnection(&ConnectInf); + db_BrowserDB = wxDbGetConnection(&ConnectInf); // wxLogMessage(">>>%s<<<>>>%s<<<",UserName.c_str(),Password.c_str()); if (db_BrowserDB == NULL) { @@ -177,7 +178,7 @@ bool BrowserDB::OnCloseDB(int Quite) if (db_BrowserDB) { db_BrowserDB->Close(); - FreeDbConnection(db_BrowserDB); + wxDbFreeConnection(db_BrowserDB); // Free Environment Handle that ODBC uses if (SQLFreeEnv(&ConnectInf.Henv) != SQL_SUCCESS) @@ -422,7 +423,7 @@ void BrowserDB::Zeiger_auf_NULL(int Art) { db_BrowserDB->CommitTrans(); db_BrowserDB->Close(); - CloseDbConnections(); + wxDbCloseConnections(); delete db_BrowserDB; } } diff --git a/demos/dbbrowse/browsedb.h b/demos/dbbrowse/browsedb.h index cd695c9e2a..9758ede57c 100644 --- a/demos/dbbrowse/browsedb.h +++ b/demos/dbbrowse/browsedb.h @@ -14,7 +14,7 @@ //---------------------------------------------------------------------------------------- // Global structure for holding ODBC connection information //---------------------------------------------------------------------------------------- -extern struct DbStuff DbConnectInf; +extern struct wxDbConnectInf DbConnectInf; class MainDoc; //---------------------------------------------------------------------------------------- class BrowserDB diff --git a/demos/dbbrowse/doc.cpp b/demos/dbbrowse/doc.cpp index df2b80db46..73d2936504 100644 --- a/demos/dbbrowse/doc.cpp +++ b/demos/dbbrowse/doc.cpp @@ -33,7 +33,7 @@ //---------------------------------------------------------------------------------------- //-- Some Global Vars for all Files (extern in ?.h needed) ------------------------------- // Global structure for holding ODBC connection information -struct DbStuff DbConnectInf; +struct wxDbConnectInf DbConnectInf; //---------------------------------------------------------------------------------------- wxConfigBase *p_ProgramCfg; // All Config and Path information wxLogTextCtrl *p_LogBook; // All Log messages @@ -165,7 +165,7 @@ bool MainDoc::OnInitODBC() // The key will be removed after sorting wxString KeyString; //--------------------------------------------------------------------------------------- - while(GetDataSource(DbConnectInf.Henv, Dsn, sizeof(Dsn), DsDesc, sizeof(DsDesc))) + while(wxDbGetDataSource(DbConnectInf.Henv, Dsn, sizeof(Dsn), DsDesc, sizeof(DsDesc))) { i_DSN++; // How many Dsn have we ? KeyString.Printf("%s%c%s",Dsn, sep, DsDesc); diff --git a/demos/dbbrowse/doc.h b/demos/dbbrowse/doc.h index 488c5093af..d831165023 100644 --- a/demos/dbbrowse/doc.h +++ b/demos/dbbrowse/doc.h @@ -20,7 +20,7 @@ class DSN }; //---------------------------------------------------------------------------------------- // Global structure for holding ODBC connection information -extern struct DbStuff DbConnectInf; +extern struct wxDbConnectInf DbConnectInf; //---------------------------------------------------------------------------------------- extern wxConfigBase *p_ProgramCfg; // All Config and Path information extern wxLogTextCtrl *p_LogBook; // All Log messages -- 2.47.2