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
This commit is contained in:
George Tasker
2000-03-16 19:02:22 +00:00
parent fdc0367851
commit df991b9dfb
4 changed files with 11 additions and 10 deletions

View File

@@ -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;
}
}

View File

@@ -14,7 +14,7 @@
//----------------------------------------------------------------------------------------
// Global structure for holding ODBC connection information
//----------------------------------------------------------------------------------------
extern struct DbStuff DbConnectInf;
extern struct wxDbConnectInf DbConnectInf;
class MainDoc;
//----------------------------------------------------------------------------------------
class BrowserDB

View File

@@ -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);

View File

@@ -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