Commit Graph

44 Commits

Author SHA1 Message Date
George Tasker
b742792c08 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.
Formatting of source code cleaned up.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-02-13 11:42:35 +00:00
Julian Smart
1ddfb726b2 Updated VC++ project files for making DLL-based samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-02-06 17:50:06 +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
6a71ee861c One more wxString change that I originally missed
A few more Unicode changes I missed
Made one more param in the wxDb constructor be a const (like it should have been).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-02-04 15:56:59 +00:00
George Tasker
5cf34cf07e 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().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-02-03 17:50:45 +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
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
e2f4e132c1 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


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-11-20 17:17:09 +00:00
Mark Johnson
a9f4558ff1 db.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-08-12 11:15:24 +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
George Tasker
ec974d2300 RCS left a turd in the previous checkin
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-17 11:18:46 +00:00
George Tasker
2750885629 Fixed compilation in release mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-17 11:15:57 +00:00
Mark Johnson
595b5c4eb6 db.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-17 08:44:44 +00:00
George Tasker
69d042c37d Fixed a typo in wxDbConnectionsInUse()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-16 19:42:29 +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
Bart A.M. Jourquin
ad2522ad3f add SQL_CATALOG and SQL_LOG filename variablesas extern
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-08 11:06:53 +00:00
George Tasker
95ca6a20b5 Removed tabs and cleaned up indentations.
Added SQL_LOG_FILENAME and SQL_CATALOG_FILENAME constants to remove embedded text filenames


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-01-31 15:41:28 +00:00
Robert Roebling
16b52fa1b7 Disabled ODBC code by default,
Move isql.h and isqlext.h to /include/wx


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-01-29 17:52:53 +00:00
Robert Roebling
d76fe38b29 Copied isql.h and isqlext.h to /include/wx/unix and make
it get installed.
  New code for "best_visual" under SGI and Sun.
  Typos in PostScrip code: HelvO and CourO.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5713 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-01-27 19:50:46 +00:00
George Tasker
30a6d2d264 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@5547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-01-20 14:15:44 +00:00
Robert Roebling
b47c832e55 Made db.h compile (removed this wxODBC_ONLY_FARWRD_XXXXXX),
Added sources for TIFF 3.5.2 from libtiff.org.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-30 18:42:35 +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
0b0ca94c89 Added "const" to the (char *) type params that should have been const params
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-25 15:52:09 +00:00
George Tasker
e5ad852877 Commented out the defines of strnicmp and stricmp to fix OS/2 compilation. These should not be necessary any longer since db uses wxStrxxxx functions now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-25 12:35:31 +00:00
George Tasker
ac4650263f Added preliminary support for Informix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-24 18:44:08 +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
Julian Smart
154f22b3fa Fixes to Cygwin/Mingw32 makefile, manual now compiles wxStaticLine, etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-08 21:14:50 +00:00
George Tasker
d194ddf23b Undoing my last checkin so wxGTK compiles correctly under unix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-07 14:43:30 +00:00
George Tasker
e4a330f1e5 Fixed a multiple define problem for strnicmp and stricmp by using the definition from utils.h if compiling for wx2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-11-07 02:03:37 +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
53953cf736 Moved the #include of filefn.h to db.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-12 17:19:45 +00:00
George Tasker
aa277f4ce2 Changed #ifdef _IODBC_ to #ifdef __UNIX__
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-12 11:02:53 +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
88ac883a0d new makefiles (part I)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-06-01 15:32:12 +00:00
Robert Roebling
cd5bf2a6e3 iODBC v2.5
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-01-22 10:52:42 +00:00
Robert Roebling
1acd7ba6f2 ODBC updates (it almost works now)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-01-09 10:42:08 +00:00
Unknown (UG)
a121841570 no message
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-01-08 12:45:07 +00:00
Unknown (UG)
9f8de18fb6 no message
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-01-08 11:54:12 +00:00
Robert Roebling
7e616b1050 Guess what: ODBC updates and build fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-12-30 23:30:49 +00:00
Julian Smart
1fc5dd6f8e Updated the Remstar ODBC files, got the db sample compiling; added Freq and SubString
to wxString


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-12-30 17:40:53 +00:00
Julian Smart
108106cfe7 Added ODBC database classes and sample from RemStar (sample needs work for wxWin 2)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1998-07-28 09:43:44 +00:00