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:
@@ -32,9 +32,9 @@
|
|||||||
//----------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------
|
||||||
// Global structure for holding ODBC connection information
|
// Global structure for holding ODBC connection information
|
||||||
// - darf nur einmal im Projekte definiert werden ?? Extra Databasse Klasse ?
|
// - 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)
|
char *GetExtendedDBErrorMsg(char *ErrFile, int ErrLine)
|
||||||
{
|
{
|
||||||
@@ -53,7 +53,8 @@ char *GetExtendedDBErrorMsg(char *ErrFile, int ErrLine)
|
|||||||
// msg += "\n";
|
// msg += "\n";
|
||||||
/* Scan through each database connection displaying
|
/* Scan through each database connection displaying
|
||||||
* any ODBC errors that have occured. */
|
* 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
|
// Skip over any free connections
|
||||||
if (pDbList->Free)
|
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.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.Uid, UserName); // database username - must already exist in the data source
|
||||||
strcpy(ConnectInf.AuthStr, Password); // password database username
|
strcpy(ConnectInf.AuthStr, Password); // password database username
|
||||||
db_BrowserDB = GetDbConnection(&ConnectInf);
|
db_BrowserDB = wxDbGetConnection(&ConnectInf);
|
||||||
// wxLogMessage(">>>%s<<<>>>%s<<<",UserName.c_str(),Password.c_str());
|
// wxLogMessage(">>>%s<<<>>>%s<<<",UserName.c_str(),Password.c_str());
|
||||||
if (db_BrowserDB == NULL)
|
if (db_BrowserDB == NULL)
|
||||||
{
|
{
|
||||||
@@ -177,7 +178,7 @@ bool BrowserDB::OnCloseDB(int Quite)
|
|||||||
if (db_BrowserDB)
|
if (db_BrowserDB)
|
||||||
{
|
{
|
||||||
db_BrowserDB->Close();
|
db_BrowserDB->Close();
|
||||||
FreeDbConnection(db_BrowserDB);
|
wxDbFreeConnection(db_BrowserDB);
|
||||||
|
|
||||||
// Free Environment Handle that ODBC uses
|
// Free Environment Handle that ODBC uses
|
||||||
if (SQLFreeEnv(&ConnectInf.Henv) != SQL_SUCCESS)
|
if (SQLFreeEnv(&ConnectInf.Henv) != SQL_SUCCESS)
|
||||||
@@ -422,7 +423,7 @@ void BrowserDB::Zeiger_auf_NULL(int Art)
|
|||||||
{
|
{
|
||||||
db_BrowserDB->CommitTrans();
|
db_BrowserDB->CommitTrans();
|
||||||
db_BrowserDB->Close();
|
db_BrowserDB->Close();
|
||||||
CloseDbConnections();
|
wxDbCloseConnections();
|
||||||
delete db_BrowserDB;
|
delete db_BrowserDB;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
//----------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------
|
||||||
// Global structure for holding ODBC connection information
|
// Global structure for holding ODBC connection information
|
||||||
//----------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------
|
||||||
extern struct DbStuff DbConnectInf;
|
extern struct wxDbConnectInf DbConnectInf;
|
||||||
class MainDoc;
|
class MainDoc;
|
||||||
//----------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------
|
||||||
class BrowserDB
|
class BrowserDB
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
//----------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------
|
||||||
//-- Some Global Vars for all Files (extern in ?.h needed) -------------------------------
|
//-- Some Global Vars for all Files (extern in ?.h needed) -------------------------------
|
||||||
// Global structure for holding ODBC connection information
|
// Global structure for holding ODBC connection information
|
||||||
struct DbStuff DbConnectInf;
|
struct wxDbConnectInf DbConnectInf;
|
||||||
//----------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------
|
||||||
wxConfigBase *p_ProgramCfg; // All Config and Path information
|
wxConfigBase *p_ProgramCfg; // All Config and Path information
|
||||||
wxLogTextCtrl *p_LogBook; // All Log messages
|
wxLogTextCtrl *p_LogBook; // All Log messages
|
||||||
@@ -165,7 +165,7 @@ bool MainDoc::OnInitODBC()
|
|||||||
// The key will be removed after sorting
|
// The key will be removed after sorting
|
||||||
wxString KeyString;
|
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 ?
|
i_DSN++; // How many Dsn have we ?
|
||||||
KeyString.Printf("%s%c%s",Dsn, sep, DsDesc);
|
KeyString.Printf("%s%c%s",Dsn, sep, DsDesc);
|
||||||
|
@@ -20,7 +20,7 @@ class DSN
|
|||||||
};
|
};
|
||||||
//----------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------
|
||||||
// Global structure for holding ODBC connection information
|
// 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 wxConfigBase *p_ProgramCfg; // All Config and Path information
|
||||||
extern wxLogTextCtrl *p_LogBook; // All Log messages
|
extern wxLogTextCtrl *p_LogBook; // All Log messages
|
||||||
|
Reference in New Issue
Block a user