This commit was manufactured by cvs2svn to create tag 'WX_2_2_9'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_2_9@13364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2002-01-04 16:15:08 +00:00
parent dc3d889d0b
commit f7f6abe24d
2324 changed files with 375095 additions and 121526 deletions

View File

@@ -0,0 +1,351 @@
# Microsoft Developer Studio Project File - Name="DbbrowseVC" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=DbbrowseVC - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "DbbrowseVC.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "DbbrowseVC.mak" CFG="DbbrowseVC - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "DbbrowseVC - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "DbbrowseVC - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE "DbbrowseVC - Win32 Debug DLL" (based on "Win32 (x86) Application")
!MESSAGE "DbbrowseVC - Win32 Release DLL" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "DbbrowseVC - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/dbbrowse.exe" /libpath:"../../lib" /libpath:"../../contrib/lib"
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/dbbrowse.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib"
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "DebugDLL"
# PROP BASE Intermediate_Dir "DebugDLL"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "DebugDLL"
# PROP Intermediate_Dir "DebugDLL"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/dbbrowse.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib"
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "ReleaseDLL"
# PROP BASE Intermediate_Dir "ReleaseDLL"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "ReleaseDLL"
# PROP Intermediate_Dir "ReleaseDLL"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx22_9.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/dbbrowse.exe" /libpath:"../../lib" /libpath:"../../contrib/lib"
!ENDIF
# Begin Target
# Name "DbbrowseVC - Win32 Release"
# Name "DbbrowseVC - Win32 Debug"
# Name "DbbrowseVC - Win32 Debug DLL"
# Name "DbbrowseVC - Win32 Release DLL"
# Begin Source File
SOURCE=.\browsedb.cpp
!IF "$(CFG)" == "DbbrowseVC - Win32 Release"
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\browsedb.h
# End Source File
# Begin Source File
SOURCE=.\dbbrowse.cpp
!IF "$(CFG)" == "DbbrowseVC - Win32 Release"
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\dbbrowse.h
# End Source File
# Begin Source File
SOURCE=.\dbbrowse.rc
# ADD BASE RSC /l 0x809
# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include"
# End Source File
# Begin Source File
SOURCE=.\dbgrid.cpp
!IF "$(CFG)" == "DbbrowseVC - Win32 Release"
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\dbgrid.h
# End Source File
# Begin Source File
SOURCE=.\dbtree.cpp
!IF "$(CFG)" == "DbbrowseVC - Win32 Release"
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\dbtree.h
# End Source File
# Begin Source File
SOURCE=.\dlguser.cpp
!IF "$(CFG)" == "DbbrowseVC - Win32 Release"
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\dlguser.h
# End Source File
# Begin Source File
SOURCE=.\doc.cpp
!IF "$(CFG)" == "DbbrowseVC - Win32 Release"
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\doc.h
# End Source File
# Begin Source File
SOURCE=.\pgmctrl.cpp
!IF "$(CFG)" == "DbbrowseVC - Win32 Release"
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\pgmctrl.h
# End Source File
# Begin Source File
SOURCE=.\std.h
# End Source File
# Begin Source File
SOURCE=.\tabpgwin.cpp
!IF "$(CFG)" == "DbbrowseVC - Win32 Release"
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "DbbrowseVC - Win32 Release DLL"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\tabpgwin.h
# End Source File
# End Target
# End Project

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "DbbrowseVC"=.\DbbrowseVC.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -33,6 +33,11 @@
// Global structure for holding ODBC connection information
// - darf nur einmal im Projekte definiert werden ?? Extra Databasse Klasse ?
wxDbConnectInf ConnectInf; // F<>r DBase
#if !wxUSE_ODBC
#error Demo cannot be compiled unless setup.h has wxUSE_ODBC set to 1
#endif
//----------------------------------------------------------------------------------------
extern WXDLLEXPORT_DATA(wxDbList*) PtrBegDbList; /* from db.cpp, used in getting back error results from db connections */
//----------------------------------------------------------------------------------------
@@ -90,9 +95,9 @@ BrowserDB::~BrowserDB()
Zeiger_auf_NULL(1); // Clean up Tables and Databases (Commit, Close und delete)
} // BrowserDB destructor
//----------------------------------------------------------------------------------------
bool BrowserDB::Initialize(int Quite)
bool BrowserDB::Initialize(int Quiet)
{
if (!OnStartDB(Quite))
if (!OnStartDB(Quiet))
{
wxLogMessage(_("\n\n-E-> BrowserDB::OnStartDB(%s) : Failed ! "),ODBCSource.c_str());
return FALSE;
@@ -100,21 +105,21 @@ bool BrowserDB::Initialize(int Quite)
return TRUE;
} // BrowserDB:Initialize
//----------------------------------------------------------------------------------------
bool BrowserDB::OnStartDB(int Quite)
bool BrowserDB::OnStartDB(int Quiet)
{
wxStopWatch sw;
if (!Quite)
if (!Quiet)
wxLogMessage(_("\n-I-> BrowserDB::OnStartDB(%s) : Begin "),ODBCSource.c_str());
if (db_BrowserDB != NULL)
{
if (!Quite)
if (!Quiet)
wxLogMessage(_("\n-I-> BrowserDB::OnStartDB() : DB is allready open."));
return TRUE;
}
// Initialize the ODBC Environment for Database Operations
if (SQLAllocEnv(&ConnectInf.Henv) != SQL_SUCCESS)
{
if (!Quite)
if (!Quiet)
wxLogMessage(_("\n-E-> BrowserDB::OnStartDB() : DB CONNECTION ERROR : A problem occured while trying to get a connection to the data source"));
return FALSE;
}
@@ -152,7 +157,7 @@ bool BrowserDB::OnStartDB(int Quite)
strcpy(ConnectInf.Dsn, "");
strcpy(ConnectInf.Uid, "");
strcpy(ConnectInf.AuthStr, "");
if (!Quite)
if (!Quiet)
{
wxLogMessage(_("\n-E-> BrowserDB::OnConnectDataSource() DB CONNECTION ERROR : Unable to connect to the data source.\n\nCheck the name of your data source to verify it has been correctly entered/spelled.\n\nWith some databases, the user name and password must\nbe created with full rights to the table prior to making a connection\n(using tools provided by the database manufacturer)"));
wxLogMessage(_("-I-> BrowserDB::OnStartDB(%s) : End - Time needed : %ld ms"),ODBCSource.c_str(),sw.Time());
@@ -160,7 +165,7 @@ bool BrowserDB::OnStartDB(int Quite)
return FALSE;
}
//--------------------------------------------------------------------------------------
if (!Quite)
if (!Quiet)
{
Temp1 = db_BrowserDB->GetDatabaseName();
Temp2 = db_BrowserDB->GetDataSource();
@@ -171,9 +176,9 @@ bool BrowserDB::OnStartDB(int Quite)
} else return FALSE;
}
//----------------------------------------------------------------------------------------
bool BrowserDB::OnCloseDB(int Quite)
bool BrowserDB::OnCloseDB(int Quiet)
{
if (!Quite)
if (!Quiet)
wxLogMessage(_("-I-> BrowserDB::OnCloseDB() : Begin "));
if (db_BrowserDB)
{
@@ -187,12 +192,12 @@ bool BrowserDB::OnCloseDB(int Quite)
}
db_BrowserDB = NULL;
}
if (!Quite)
if (!Quiet)
wxLogMessage(_("\n-I-> BrowserDB::OnCloseDB() : End "));
return TRUE;
}
//----------------------------------------------------------------------------------------
bool BrowserDB::OnGetNext(int Cols,int Quite)
bool BrowserDB::OnGetNext(int Cols,int Quiet)
{
SDWORD cb;
int i_dbDataType;
@@ -326,7 +331,7 @@ bool BrowserDB::OnGetNext(int Cols,int Quite)
return TRUE;
}
//----------------------------------------------------------------------------------------
bool BrowserDB::OnSelect(wxString tb_Name, int Quite)
bool BrowserDB::OnSelect(wxString tb_Name, int Quiet)
{
wxStopWatch sw;
wxString SQLStmt;
@@ -357,34 +362,34 @@ bool BrowserDB::OnSelect(wxString tb_Name, int Quite)
//---------------------------------------------------------------------------------------
// SetColDefs ( 0,"NAME", DB_DATA_TYPE_VARCHAR, Name, SQL_C_CHAR, sizeof(Name), TRUE, TRUE); // Primary index
//---------------------------------------------------------------------------------------
if (!Quite)
if (!Quiet)
{
wxLogMessage(_("\n-I-> BrowserDB::OnSelect(%s) Records(%d): End - Time needed : %ld ms"),tb_Name.c_str(),i_Records,sw.Time());
}
return TRUE;
}
//----------------------------------------------------------------------------------------
bool BrowserDB::OnExecSql(wxString SQLStmt, int Quite)
bool BrowserDB::OnExecSql(wxString SQLStmt, int Quiet)
{
//---------------------------------------------------------------------------------------
if (!db_BrowserDB->ExecSql((char *)(SQLStmt.GetData())))
{
Temp0.Printf(_("\n-E-> BrowserDB::OnExecSQL - ODBC-Error with ExecSql of >%s<.\n-E-> "),SQLStmt.c_str());
Temp0 += GetExtendedDBErrorMsg(__FILE__,__LINE__);
if (!Quite)
if (!Quiet)
wxLogMessage(Temp0);
else
wxMessageBox("-E-> BrowserDB::OnExecSql - ExecSql()");
return FALSE;
}
if (!Quite)
if (!Quiet)
{
// wxLogMessage(_("\n-I-> BrowserDB::OnExecSql(%s) - End - Time needed : %ld ms"),SQLStmt.c_str(),sw.Time());
}
return TRUE;
}
//----------------------------------------------------------------------------------------
wxDbInf* BrowserDB::OnGetCatalog(int Quite)
wxDbInf* BrowserDB::OnGetCatalog(int Quiet)
{
char UName[255];
strcpy(UName,UserName);
@@ -392,13 +397,13 @@ wxDbInf* BrowserDB::OnGetCatalog(int Quite)
return ct_BrowserDB;
}
//----------------------------------------------------------------------------------------
wxColInf* BrowserDB::OnGetColumns(char *tableName, int numCols,int Quite)
wxDbColInf* BrowserDB::OnGetColumns(char *tableName, int numCols, int Quiet)
{
char UName[255];
int i;
strcpy(UName,UserName);
cl_BrowserDB = db_BrowserDB->GetColumns(tableName,&numCols,UName);
cl_BrowserDB->pColFor = new wxColFor[numCols];
cl_BrowserDB->pColFor = new wxDbColFor[numCols];
for (i=0;i<numCols;i++)
{
(cl_BrowserDB->pColFor+i)->Format(1,(cl_BrowserDB+i)->dbDataType,(cl_BrowserDB+i)->sqlDataType,

View File

@@ -1,6 +1,6 @@
//----------------------------------------------------------------------------------------
// Name: browsedb.h
// Purpose: a wxDB class
// Purpose: a wxDb class
// Author: Mark Johnson, mj10777@gmx.net
// Modified by:
// Created: 19991127.mj10777
@@ -26,24 +26,24 @@ class BrowserDB
// for user login names and passwords, getting workstation settings, etc.
// ---> IMPORTANT <---
//
// For each database object created which uses this wxDB pointer
// For each database object created which uses this wxDb pointer
// connection to the database, when a CommitTrans() or RollBackTrans()
// will commit or rollback EVERY object which uses this wxDB pointer.
// will commit or rollback EVERY object which uses this wxDb pointer.
//
// To allow each table object (those derived from wxTable) to be
// To allow each table object (those derived from wxDbTable) to be
// individually committed or rolled back, you MUST use a different
// instance of wxDB in the constructor of the table. Doing so creates
// instance of wxDb in the constructor of the table. Doing so creates
// more overhead, and will use more database connections (some DBs have
// connection limits...), so use connections sparringly.
//
// It is recommended that one "main" database connection be created for
// the entire program to use for READ-ONLY database accesses, but for each
// table object which will do a CommitTrans() or RollbackTrans() that a
// new wxDB object be created and used for it.
// new wxDb object be created and used for it.
//---------------------------------------------------------------------------------------
wxDB* db_BrowserDB;
wxDb* db_BrowserDB;
wxDbInf* ct_BrowserDB;
wxColInf* cl_BrowserDB;
wxDbColInf* cl_BrowserDB;
wxString ODBCSource, UserName, Password;
MainDoc *pDoc;
//---------------------------------------------------------------------------------------
@@ -61,15 +61,15 @@ class BrowserDB
BrowserDB();
~BrowserDB();
void Zeiger_auf_NULL(int Art);
bool Initialize(int Quite);
bool Initialize(int Quiet);
//---------------------------------------------------------------------------------------
bool OnStartDB(int Quite);
bool OnCloseDB(int Quite);
bool OnSelect(wxString tb_Name,int Quite);
bool OnExecSql(wxString SQLStmt,int Quite);
bool OnGetNext(int Cols,int Quite);
wxDbInf* OnGetCatalog(int Quite);
wxColInf* OnGetColumns(char *tableName, int numCols,int Quite);
bool OnStartDB(int Quiet);
bool OnCloseDB(int Quiet);
bool OnSelect(wxString tb_Name,int Quiet);
bool OnExecSql(wxString SQLStmt,int Quiet);
bool OnGetNext(int Cols,int Quiet);
wxDbInf* OnGetCatalog(int Quiet);
wxDbColInf* OnGetColumns(char *tableName, int numCols,int Quiet);
void OnFillSqlTyp();
void OnFilldbTyp();
//---------------------------------------------------------------------------------------

View File

@@ -269,6 +269,11 @@ MainFrame::MainFrame(wxFrame *frame, char *title, const wxPoint& pos, const wxS
//----------------------------------------------------------------------------------------
MainFrame::~MainFrame(void)
{
// Close the help frame; this will cause the config data to get written.
if (p_Help->GetFrame()) // returns NULL if no help frame active
p_Help->GetFrame()->Close(TRUE);
delete p_Help; // Memory Leak
p_Help = NULL;
// save the control's values to the config
if (p_ProgramCfg == NULL)
return;
@@ -292,9 +297,6 @@ MainFrame::~MainFrame(void)
//----------------------------------------------------------------------------------------
void MainFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
// Close the help frame; this will cause the config data to get written.
if (p_Help->GetFrame()) // returns NULL if no help frame active
p_Help->GetFrame()->Close(TRUE);
Close(TRUE);
}
//----------------------------------------------------------------------------------------

156
demos/dbbrowse/dbbrowse.dsp Normal file
View File

@@ -0,0 +1,156 @@
# Microsoft Developer Studio Project File - Name="dbbrowse" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** NICHT BEARBEITEN **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=dbbrowse - Win32 Debug
!MESSAGE Dies ist kein g<>ltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und f<>hren Sie den Befehl
!MESSAGE
!MESSAGE NMAKE /f "dbbrowse.mak".
!MESSAGE
!MESSAGE Sie k<>nnen beim Ausf<73>hren von NMAKE eine Konfiguration angeben
!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
!MESSAGE
!MESSAGE NMAKE /f "dbbrowse.mak" CFG="dbbrowse - Win32 Debug"
!MESSAGE
!MESSAGE F<>r die Konfiguration stehen zur Auswahl:
!MESSAGE
!MESSAGE "dbbrowse - Win32 Release" (basierend auf "Win32 (x86) Application")
!MESSAGE "dbbrowse - Win32 Debug" (basierend auf "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "dbbrowse - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /D "__WXMSW__" /D "__WIN95__" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"wx/wxprec.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "NDEBUG"
# ADD RSC /l 0x407 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 wx.lib jpeg.lib png.lib tiff.lib xpm.lib zlib.lib advapi32.lib comctl32.lib comdlg32.lib gdi32.lib kernel32.lib odbc32.lib odbccp32.lib ole32.lib oleaut32.lib rpcrt4.lib shell32.lib user32.lib uuid.lib winspool.lib wsock32.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcmt.lib"
!ELSEIF "$(CFG)" == "dbbrowse - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "__WXDEBUG__" /D WXDEBUG=1 /D "__WXMSW__" /D "__WIN95__" /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_MBCS" /D "__WINDOWS__" /Yu"wx/wxprec.h" /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "_DEBUG"
# ADD RSC /l 0x407 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 wxd.lib jpegd.lib pngd.lib tiffd.lib xpmd.lib zlibd.lib advapi32.lib comctl32.lib comdlg32.lib gdi32.lib kernel32.lib odbc32.lib odbccp32.lib ole32.lib oleaut32.lib rpcrt4.lib shell32.lib user32.lib uuid.lib winspool.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcmt.lib" /pdbtype:sept
!ENDIF
# Begin Target
# Name "dbbrowse - Win32 Release"
# Name "dbbrowse - Win32 Debug"
# Begin Group "Quellcodedateien"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\browsedb.cpp
# End Source File
# Begin Source File
SOURCE=.\dbbrowse.cpp
# End Source File
# Begin Source File
SOURCE=.\dbgrid.cpp
# End Source File
# Begin Source File
SOURCE=.\dbtree.cpp
# End Source File
# Begin Source File
SOURCE=.\dlguser.cpp
!IF "$(CFG)" == "dbbrowse - Win32 Release"
# ADD CPP /Yu
!ELSEIF "$(CFG)" == "dbbrowse - Win32 Debug"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\doc.cpp
# End Source File
# Begin Source File
SOURCE=.\dummy.cpp
# ADD CPP /Yc"wx/wxprec.h"
# End Source File
# Begin Source File
SOURCE=.\pgmctrl.cpp
# End Source File
# Begin Source File
SOURCE=.\tabpgwin.cpp
# End Source File
# End Group
# Begin Group "Header-Dateien"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\std.h
# End Source File
# End Group
# Begin Group "Ressourcendateien"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\dbbrowse.rc
# End Source File
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GEL<45>SCHT WERDEN!
###############################################################################
Project: "dbbrowse"=".\dbbrowse.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -74,6 +74,8 @@ DBGrid::DBGrid(wxWindow *parent, const wxWindowID id,const wxPoint& pos,const wx
//----------------------------------------------------------------------------------------
DBGrid::~DBGrid()
{
delete popupMenu1;
delete popupMenu2;
}
//----------------------------------------------------------------------------------------
int DBGrid::OnTableView(wxString Table)
@@ -122,7 +124,7 @@ int DBGrid::OnTableView(wxString Table)
}
if (z % 50 == 0)
{
Temp0.Printf(_("-I-> DBGrid::OnTableView(%s) - Record %6d has been read."),Table.c_str(),z);
Temp0.Printf(_("-I-> DBGrid::OnTableView(%s) - Record %6d (from %d) has been read."),Table.c_str(),z,(db_Br+i_Which)->i_Records);
pDoc->p_MainFrame->SetStatusText(Temp0, 0);
}
} // for (z=0;z<(db_Br+i_Which)->i_Records;z++)

View File

@@ -100,6 +100,10 @@ DBTree::~DBTree()
(pDoc->db_Br+i_Which)->cl_BrowserDB = NULL;
delete ct_BrowserDB;
delete p_imageListNormal;
if (popupMenu1) // If the DSN has no Tables, then no delete should be done !
delete popupMenu1;
if (popupMenu1) // If the DSN has no Tables, then no delete should be done !
delete popupMenu2;
}
//----------------------------------------------------------------------------------------
#undef TREE_EVENT_HANDLER
@@ -202,7 +206,7 @@ int DBTree::OnPopulate()
z++;
if (z % 10 == 0)
{
Temp0.Printf(_("-I-> DBTree::OnPopulate(%s) - Table %6d has been read."),(ct_BrowserDB->pTableInf+x)->tableName,z);
Temp0.Printf(_("-I-> DBTree::OnPopulate(%s) - Table %6d (from %d) has been read."),(ct_BrowserDB->pTableInf+x)->tableName,z,ct_BrowserDB->numTables);
pDoc->p_MainFrame->SetStatusText(Temp0, 0);
}
} // if ((ct_BrowserDB->pTableInf+x)->tableType == "TABLE" or VIEW)

View File

@@ -1,2 +1,3 @@
#! /bin/sh
msgfmt -o dbbrowse.mo dbbrowse.po
msgfmt -o help.mo help.po

View File

@@ -1 +1,2 @@
#! /bin/sh
msgfmt -o wxStd.mo de.po

View File

@@ -1 +1,2 @@
xgettext -C -i -s -j -a -d PgmText -f xget.cfg
#! /bin/sh
xgettext -C -i -s -j -a -d PgmText -f xget.cfg

View File

@@ -63,7 +63,8 @@ MainDoc::~MainDoc()
// ----------------------------------------------------------
// -E-> The Tree Controls take to long to close : Why ??
// ----------------------------------------------------------
// wxMessageBox("-I-> end Doc");
delete ft_Doc;
ft_Doc = NULL;
p_TabArea->Show(FALSE); // Deactivate the Window
p_PageArea->Show(FALSE); // Deactivate the Window
p_PgmCtrl = NULL;
@@ -108,6 +109,8 @@ bool MainDoc::OnInitView()
wxBitmap *p_FolderClose = new wxBitmap("PgmCtrl"); //, wxBITMAP_TYPE_BMP_RESOURCE); // BJO20000115
//---------------------------------------------------------------------------------------
p_TabArea->AddTab(p_PgmCtrl,"PgmCtrl",p_FolderClose);
delete p_FolderClose; // Memory leak
p_FolderClose = NULL;
//---------------------------------------------------------------------------------------
// now create "output" window
//---------------------------------------------------------------------------------------

36
demos/dbbrowse/dummy.cpp Normal file
View File

@@ -0,0 +1,36 @@
/*
* File: dummy.cc
* Purpose: See below
* Author: Julian Smart
* Created: 1993
* Updated:
* Copyright: (c) 1993, AIAI, University of Edinburgh
*/
/* A dummy file to include wx.h. If precompiling wx.h, I
* always start by compiling this and producing the PCH file.
* Then subsequent source files use the PCH file.
*
* If precompiling wx.h for wxWindows and derived apps,
* link dummy.obj with your program (the MSC 7 linker complains otherwise).
*
* This is the only convenient way I found to use precompiled headers
* under MSC 7.
*
* This will produce a big PCH file.
*/
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/msw/msvcrt.h"
// Foils optimizations in Visual C++ (see also app.cpp). Without it,
// dummy.obj isn't linked and we get a linker error.
#if defined(__VISUALC__) && defined(__WIN16__)
char wxDummyChar = 0;
#endif

View File

@@ -8,7 +8,7 @@
# Makefile for wxWindows sample (Cygwin/Mingw32).
# Set WXDIR for your system
WXDIR = $(WXWIN)
WXDIR = ../..
TARGET=dbbrowse
OBJECTS = dbbrowse.o doc.o pgmctrl.o tabpgwin.o \

View File

@@ -1,15 +0,0 @@
# Top dir of wxWindows
top_builddir = /gtm/bart/wxGTK
PROGRAM=dbbrowser_gtk
OBJECTS= dbbrowse.o doc.o pgmctrl.o tabpgwin.o\
browsedb.o dbtree.o dbgrid.o dlguser.o
include $(top_builddir)/src/makeprog.env

View File

@@ -88,6 +88,7 @@ PgmCtrl::PgmCtrl(wxWindow *parent, const wxWindowID id,const wxPoint& pos, const
PgmCtrl::~PgmCtrl()
{
delete p_imageListNormal;
delete popupMenu1;
}
//----------------------------------------------------------------------------------------
#undef TREE_EVENT_HANDLER
@@ -242,7 +243,7 @@ void PgmCtrl::OnRightSelect(wxTreeEvent& WXUNUSED(event))
}
//--------------------------------------------------------------------------------------
}
}
} // void PgmCtrl::OnRightSelect(wxTreeEvent& WXUNUSED(event))
//----------------------------------------------------------------------------------------
void PgmCtrl::OnMouseMove(wxMouseEvent &event)
{