All variables/parameters having to do with number of columns changed to be of type UWORD rather than int, avoiding compiler warnings and giant tables causing problems, and matching the types with the ODBC APIs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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
Added a parameters to wxDbTable::Open() to indicate whether Open() should check for table privileges or not.
wxDbTable::ClearMemberVar() added to set a single column to an initialized value
::ClearMemberVar() and ::ClearMemberVars() can now optionally set a column to be NULL via ::SetColNull()
::SetColNull() added as the primary function name for setting a column to be a NULL value, and ::SetNull() is deprecated
::SetColNull() now has a param to select whether a columns value is NULL or not.
::SetColNull() will now clear the column value in memory when setting the column to be NULL.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Changed signature of wxDbTable constructor to have the default value of tblPath be "" instead of NULL which prevents crashes in the logging code if the constructor initialization fails for some reason.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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
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