Commit Graph

57 Commits

Author SHA1 Message Date
George Tasker
bf5423ea7d Beginnings of BLOB support - Do not use BLOBs yet though, as they do not work, but these changes will not affect behavor of anything unless you try to create a BLOB column 0 which will fail right now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-02-13 11:41:02 +00:00
George Tasker
da99271dcb ::Initialize() methods added to the helper classes
Changed wxT("") to wxEmptyString everywhere


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-02-05 13:36:33 +00:00
George Tasker
9556da13ba Cleanup of formatting of text
Added Initialize() functions to a couple of the helper classes
More code changed to reflect new class methods that are now available.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-02-04 15:58:39 +00:00
George Tasker
942e67c3a3 wxDbConnectInf is now converted to a class. Fully backward compatible with all version except the last checkin I did (changed datatypes back to what they were before for in this class). Class now has all accessors and member functions. Functions added to remove need for calling SQLAllocEnv() and SQLFreeEnv().
General gcc changes in the Printf() statement when using wxStrings as params to Printf()
General code clean up, correcting comments, added more comments


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-02-03 17:48:06 +00:00
George Tasker
4fdae9972d All char, char *, and char arrays changed to use wxChar or wxString. 99% backward compatability maintained
Cleaned up code to remove duplicate blocks from multiple functions
Added better handling of failed creation of wxDbTable/wxDb objects
Moved code out of class constructors to a private function called from within the constructor
Moved destructor code to a cleanup() function so it could be called from within the constructor if the constructor failed.
Added wxDb::ModifyColumn() function.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-02-01 20:21:52 +00:00
George Tasker
ebf776c5b8 Fixed problem in wxDbColFor::Format() for mySQL (patch submittted directly to me from Mark Johnson) to handle SQL_C_TIMESTAMP fields, which is what mySQL uses for DATE fields.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-01-14 12:46:33 +00:00
David Webster
eedb15434a VA needs FALSE not false
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-11-29 05:17:43 +00:00
George Tasker
eb3b9ddac4 Increased the max length of allowed WHERE clauses and full statements (eventually needs to be changed over to use wxString).
Fixed the order of params in TablePrivileges()
Changed 0s to NULLs in params


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-11-24 16:46:11 +00:00
George Tasker
d8a0a1c930 Fixed problems with the wxDb::Open(wxDb *copyDb) not copying in all the different data types required values
Added Interbase database support based on contributions from Roger Gammans
Enabled the wxDb::TablePrivileges() function for v2.3/2.4
Fixed a bunch of problems with wxDb::TablePrivileges() not working correctly with all databases.
Added the ability to pass in a SCHEMA to wxDbTablePrivileges() that greatly improves the speed of the privileges lookup.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-11-22 00:19:25 +00:00
George Tasker
a8aa2258e8 Added preliminary DB2 support.
Removed the #if EXPERIMENTAL_WXDB_FUNCTIONS blocks from around functions that will now be available in 2.4
Changed functions to return const char * rather than char * on certain functions
Added the wxDb::TablePrivileges() function
Added wxDb copy constructors and wxDbGetConnection() copy constructors which are able to copy the typing definitions of data types retrieved from the source wxDb instance to the new data connection instance to avoid the network/database overhead of querying the datasource for its data types once they are already known once.
SQL Server and (preliminary) DB2 support added
If compiling with Visual C++, the wxDbCreateDataSource() can now be enabled


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-11-20 17:23:06 +00:00
Mark Johnson
0cd121f9e1 db.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 11:14:40 +00:00
Bryan Petty
3ca6a5f046 second merge of the 2.2 branch (RL)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-08 06:11:51 +00:00
Bryan Petty
f6bcfd974e merged 2.2 branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-15 19:51:35 +00:00
Julian Smart
fbdcff4a78 Misc fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-05-05 16:40:32 +00:00
Julian Smart
d50af7148c Corrected my correction.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-18 14:12:11 +00:00
Julian Smart
2c68bdb64e Moved position of WXDLLEXPORT keyword
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-18 13:24:58 +00:00
George Tasker
fdc0367851 Cleaned up the API for class/structure/function names to follow the wxWindows conventions (mostly prefixing wx to all of them). Backward compatability is maintained by keeping the old names calling the new functions, or typedef-ing the old names to the new names. The old names can be totally disabled at the end of the file by changing the #if 1 block that surrounds the old names
Added a wxDbCreateDataSource() function, though it only works under MSW using VC6, because the API is not available with iODBC.  To use this, it requires linking in odbccp32.lib and #including odbcinst.h in db.h.  This function is disabled with #if 0 for now.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-16 19:00:24 +00:00
George Tasker
bebb64f0e2 Fixed a misleading comment regarding MySQL and Postgres
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-29 11:27:43 +00:00
Robert Roebling
0efe4a9855 Compile fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-26 12:45:06 +00:00
George Tasker
52a17fe534 Replaced <iostream.h> reference with "wx/ioswrap.h"
Replaced wxMessageBox() with wxLogDebug() calls
When calling GetColumns(), some drivers/datasources would not return a proper value for columnSize.  If columnSize is less than 1, columnSize gets set to bufferLength


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-25 20:27:37 +00:00
George Tasker
ea5d599df3 Reverting back to 1.35 as 1.36 does not work with all data sources
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-24 00:35:28 +00:00
George Tasker
2f74ed2859 ::IsNumber() returned FALSE if a + or - sign was the first character of the string. "-123" should be considered a number
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-23 23:11:53 +00:00
Vadim Zeitlin
23f681ec48 1. implemented wxRegKey::Copy() and CopyValue()
2. regtest sample doesn't crash any more
3. wxLogGui uses msg box for only 1 message
4. "const wxEventType" => "enum"
5. wxEVT_COMMAND_TREE_END_DRAG introduced - see sample for example
6. fixed several non fatal bugs in wxRegKey
7. many changes in regtest sample, not tested yet


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-15 00:05:36 +00:00
Bart A.M. Jourquin
9453a61bd8 add SQL_CATALOG and SQL_LOG filename variables
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-08 11:06:07 +00:00
George Tasker
1e92909e9a Replaced tabs and cleaned up indentations.
Replaced all the char arrays I could with wxStrings.  Should noticably reduce memory used by classes.
Fixed "for (int i=0...)" occurances


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-01-31 15:44:54 +00:00
Bart A.M. Jourquin
c56dadd8ed IODBC fix in GetDataSource
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-01-27 13:10:54 +00:00
George Tasker
579d7d1316 Fixed the GetDataSource() function so the DsDesc that is returned is the full description
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-01-27 11:44:09 +00:00
Vadim Zeitlin
f1df09276c 1. wxWizard supports setting images for each page, sample updated to show it
2. wxLogGui now uses a special dialog instead of a wxMsgBox
3. wxComboBox doesn't limit the text to its size under MSW
4. removed windows.h from dummy.cpp because I think it's unneeded


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-01-21 02:26:25 +00:00
George Tasker
67e9aaa3c9 Uses src/iodbc headers rather than windows headers to hopefully standardize across all platforms, and relieve dependency on <windows.h>
Now allows reading of unknown data table structures to create wxTable instances without knowing the data dictionary ahead of time (see wxColInf() class and use)
Ability to determine keys/foreign keys and read in those key definitions (see wxColFor() and wxDB::GetKeyFields() contributed by Mark Johnson)
More support for mySQL, now handles columns with "non-standard" types (contributed by Bart Jourquin)
SQLUnbind() was being called in some places which release ALL tables bound to the wxDB connection, not just the desired one
To fix the SQLUnbind() problem, now temporary datasource connections use GetData() rather than binding columns to variables (see wxDB::Catalog())
wxDB::Catalog() now handles databases that support, and do not support passing a UserID to limit the scope of the catalog
wxDB:TableExists() now handles databases that support, and do not support passing a UserID to limit the scope of existence check
"const char *" now used in the appropriate places rather than "char *"
GetDataSource() was not terminating the returned data source names with a '\0'
wxTable::Open() now more gracefully handles tables not existing but trying to be opened with more detailed error messages
wxTable::CreateTable() now handles return of SQL_SUCCESS_WITH_INFO as success (needed for some databases)
Fixes to accomodate 64bit archtecture handling of some data types (may not be totally ready for 64bit, but closer now).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-01-20 14:00:47 +00:00
George Tasker
a3439c7d16 Added support for creating forward or backward scrolling cursors support at run-time versus compile time. Default behavior will be determined by wxODBC_FWD_ONLY_CURSORS set in setup.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-29 19:20:53 +00:00
George Tasker
6919c53fd2 Added "const" to the (char *) type params that should have been const params. Cleaned up code surrounding the upper casing (or not uppercasing) user names and table names for specific databases.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-25 15:54:04 +00:00
George Tasker
e8af381479 Replaced all the strxxx() function calls with wxStrxxx() function calls. Added preliminary support for Informix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-24 18:42:51 +00:00
Robert Roebling
c4fda16bb0 Added a few non-threads compile fixes,
Removed strcasecmp defines from db.cpp and dbtable.cpp,
  Added more stand-alone makefiles,
  wxDropSource::DoDraDrop()'s return values works now
    (wxDragNone, -Copy, -Move).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-15 17:31:10 +00:00
Stefan Csomor
e75491071d mac adaptions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-09 15:24:52 +00:00
George Tasker
e041ce574b Fixed __WXDEBUG__ references to use #ifdef rather than checking for it being greater than 0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-08 15:23:41 +00:00
George Tasker
ac99a98ff0 Fixed reversed logic on wxODBC_FWD_ONLY_CURSORS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-08 14:59:26 +00:00
George Tasker
aa33452c94 wxStrnicmp() function is not defined under windows, so I've provided a workaround that does not require that function.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-08 01:17:24 +00:00
Julian Smart
01dba85a7f Various fixes for various compilers...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-07 18:34:36 +00:00
Robert Roebling
9199e66fb5 Added wxStrnicmp and to wchar.h, not yet for Unicode mode.
Changed strcmp to wxStrcmp in db.cpp and dbtable.cpp.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-07 14:53:38 +00:00
George Tasker
78f071b6cc Renamed FWD_ONLY_CURSORS to wxODBC_FWD_ONLY_CURSORS to avoid conflicts with other libraries. The setting for this define will be included in the setup.h files so that people using the Remstar ODBC classes will now be able to use data sources/ODBC drivers that only support foward scrolling cursors (like dBase).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-06 17:09:35 +00:00
Stefan Csomor
519cb848a8 CW5.2 Pro Adaptions, wxMac starting to move in
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4366 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-05 09:16:09 +00:00
Vadim Zeitlin
12234741d9 gcc warning about printf() format mismatch corrected
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-18 14:29:23 +00:00
George Tasker
9c40a88dbb Removed a variable declaration from within a FOR statement for compilation on HP-UX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-15 10:11:06 +00:00
Vadim Zeitlin
a497618a56 1. DLL compilation fixes (wrong WXDLLEXPORT placement) in db.h/cpp
2. dummy typedef added to gsocket.c - trans unit can't be empty
3. WX_DEFINE_EXPORTED_ARRAY & friends appear


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-12 23:57:40 +00:00
George Tasker
3351164d4c Moved the #include of filefn.h from db.h to db.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-12 17:20:48 +00:00
George Tasker
e57fe6cc73 Use of a postgres data source would fail due to checking for "PostgresSQL" rather than "PostgreSQL"
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-12 11:06:24 +00:00
Robert Roebling
e115e77131 Applied a few patches,
Put some life into iODBC again,


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-09 13:32:40 +00:00
George Tasker
a2115c88f3 Added support for dBase, PostGres, MySQL, Access, MS SQL Server.
Added QUERY_ONLY data connection types.
SQL logging code addded.
Cleaned up handling compilation under both 1.6x and 2.x.
Added debug code to warn when connections were not released on program termination.
MS-VC6 corrections due to larger memory buffers required.
Parameter added to not require CreateView() and CreateTable() to drop the view or table first.
DropView() function added.
Database UserIDs can now be passed to functions that need them.
SQLUnbind() called where needed now to prevent resource leaks.
TableExists() function now handles dBase files.
Dbms() function added to determine which database the program is currently running against.
Comments have been added to the Dbms() function to indicate issues specific to different data sources.
Dynamic cursor support added (no longer creates 5-7 cursors for every wxTable instance).
wxTable dtor is now virtual.
Parameter added to not require CreateIndex() and CreateTable() to drop the view or table first.
DropIndex() and DropTable() functions added.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-07 14:19:57 +00:00
Vadim Zeitlin
e90c1d2a19 many changes; major ones:
1. start of !wxUSE_GUI support
2. _T() macro renamed to T()
3. wxConvertWX2MB and MB2WX macro added


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-04 20:15:38 +00:00
Robert Roebling
e179bd6537 Re-Added wxStream::StreamSize()
Added in-place editting to wxTreeCtrl,
    modified wxListCtrl in-place editting
  Corrected behaviour of wxToolBar::Toggle() to not
    send messages and to report the correct state
  Removed many #include "wx/wx.h" to speed up
   compilation
 Some more compile fixes and tests.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-07-25 12:59:58 +00:00