The wxDb::Open() function that takes a wxDbConnectInf() now has a second optional parameter 'failOnDataTypeUnsupported' that defaults to TRUE to maintain current behavior. This allows users to specify FALSE if they want to try to continue
Reformatting of some text, and removal of old commented out code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27227
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
enum enumDummy {enumDum1};
#ifndef SQL_C_BOOLEAN
enum enumDummy {enumDum1};
#ifndef SQL_C_BOOLEAN
-#define SQL_C_BOOLEAN(datatype) (sizeof(datatype) == 1 ? SQL_C_UTINYINT : (sizeof(datatype) == 2 ? SQL_C_USHORT : SQL_C_ULONG))
-//# define SQL_C_BOOLEAN (sizeof(int) == 2 ? SQL_C_USHORT : SQL_C_ULONG)
+ #define SQL_C_BOOLEAN(datatype) (sizeof(datatype) == 1 ? SQL_C_UTINYINT : (sizeof(datatype) == 2 ? SQL_C_USHORT : SQL_C_ULONG))
#endif
#ifndef SQL_C_ENUM
#endif
#ifndef SQL_C_ENUM
-#define SQL_C_ENUM (sizeof(enumDummy) == 2 ? SQL_C_USHORT : SQL_C_ULONG)
+ #define SQL_C_ENUM (sizeof(enumDummy) == 2 ? SQL_C_USHORT : SQL_C_ULONG)
+// NOTE: If SQL_C_BLOB is defined, and it is not SQL_C_BINARY, iODBC 2.x
+// may not function correctly. Likely best to use SQL_C_BINARY direct
- #ifdef SQL_LONGVARBINARY
- #define SQL_C_BLOB SQL_LONGVARBINARY
- #elif SQL_VARBINARY
- #define SQL_C_BLOB SQL_VARBINARY
+ #ifdef SQL_C_BINARY
+ #define SQL_C_BLOB SQL_C_BINARY
-/*
-#ifndef TRUE
-#define TRUE true
-#endif
-#ifndef FALSE
-#define FALSE false
-#endif
-*/
const int wxDB_PATH_MAX = 254;
WXDLLIMPEXP_DATA_ODBC(extern wxChar const *) SQL_LOG_FILENAME;
const int wxDB_PATH_MAX = 254;
WXDLLIMPEXP_DATA_ODBC(extern wxChar const *) SQL_LOG_FILENAME;
#endif
#ifndef SQL_MAX_AUTHSTR_LEN
#endif
#ifndef SQL_MAX_AUTHSTR_LEN
-// There does not seem to be a standard for this, so I am
-// defaulting to the value that MS uses
-#define SQL_MAX_AUTHSTR_LEN MAXNAME
+ // There does not seem to be a standard for this, so I am
+ // defaulting to the value that MS uses
+ #define SQL_MAX_AUTHSTR_LEN MAXNAME
#endif
class WXDLLIMPEXP_ODBC wxDbConnectInf
#endif
class WXDLLIMPEXP_ODBC wxDbConnectInf
SWORD FsqlType;
long Precision;
short CaseSensitive;
SWORD FsqlType;
long Precision;
short CaseSensitive;
// Data Source Name, User ID, Password and whether open should fail on data type not supported
bool Open(const wxString &Dsn, const wxString &Uid, const wxString &AuthStr, bool failOnDataTypeUnsupported=TRUE);
// Data Source Name, User ID, Password and whether open should fail on data type not supported
bool Open(const wxString &Dsn, const wxString &Uid, const wxString &AuthStr, bool failOnDataTypeUnsupported=TRUE);
- bool Open(wxDbConnectInf *dbConnectInf);
+ bool Open(wxDbConnectInf *dbConnectInf, bool failOnDataTypeUnsupported=TRUE);
bool Open(wxDb *copyDb); // pointer to a wxDb whose connection info should be copied rather than re-queried
void Close(void);
bool CommitTrans(void);
bool Open(wxDb *copyDb); // pointer to a wxDb whose connection info should be copied rather than re-queried
void Close(void);
bool CommitTrans(void);