// Notice: This class library and its intellectual design are free of charge for use,
// modification, enhancement, debugging under the following conditions:
// 1) These classes may only be used as part of the implementation of a
-// wxWindows-based application
-// 2) All enhancements and bug fixes are to be submitted back to the wxWindows
-// user groups free of all charges for use with the wxWindows library.
+// wxWidgets-based application
+// 2) All enhancements and bug fixes are to be submitted back to the wxWidgets
+// user groups free of all charges for use with the wxWidgets library.
// 3) These classes may not be distributed as part of any other class library,
// DLL, text (written or electronic), other than a complete distribution of
-// the wxWindows GUI development toolkit.
+// the wxWidgets GUI development toolkit.
///////////////////////////////////////////////////////////////////////////////
/*
bool wxDb::Open(const wxString& inConnectStr, bool failOnDataTypeUnsupported)
{
wxASSERT(inConnectStr.Length());
- dsn = "";
- uid = "";
- authStr = "";
+ dsn = wxT("");
+ uid = wxT("");
+ authStr = wxT("");
RETCODE retcode;
cout << wxT("SQLSetConnectOption(CURSOR_LIB) successful") << endl;
else
cout << wxT("SQLSetConnectOption(CURSOR_LIB) failed") << endl;
+#else
+ wxUnusedVar(retcode);
#endif
}
// Connect to the data source
- UCHAR outConnectBuffer[SQL_MAX_CONNECTSTR_LEN+1]; // MS recommends at least 1k buffer
+ SQLTCHAR outConnectBuffer[SQL_MAX_CONNECTSTR_LEN+1]; // MS recommends at least 1k buffer
short outConnectBufferLen;
inConnectionStr = inConnectStr;
- retcode = SQLDriverConnect(hdbc, NULL, (UCHAR FAR *)inConnectionStr.c_str(),
- inConnectionStr.Length(), (UCHAR FAR *)outConnectBuffer,
+ retcode = SQLDriverConnect(hdbc, NULL, (SQLTCHAR FAR *)inConnectionStr.c_str(),
+ inConnectionStr.Length(), (SQLTCHAR FAR *)outConnectBuffer,
sizeof(outConnectBuffer), &outConnectBufferLen, SQL_DRIVER_COMPLETE );
if ((retcode != SQL_SUCCESS) &&
uid = Uid;
authStr = AuthStr;
- inConnectionStr = "";
- outConnectionStr = "";
+ inConnectionStr = wxT("");
+ outConnectionStr = wxT("");
RETCODE retcode;
if (copyDb->OpenedWithConnectionString())
{
// Connect to the data source
- UCHAR outConnectBuffer[SQL_MAX_CONNECTSTR_LEN+1];
+ SQLTCHAR outConnectBuffer[SQL_MAX_CONNECTSTR_LEN+1];
short outConnectBufferLen;
inConnectionStr = copyDb->GetConnectionInStr();
- retcode = SQLDriverConnect(hdbc, NULL, (UCHAR FAR *)inConnectionStr.c_str(),
- inConnectionStr.Length(), (UCHAR FAR *)outConnectBuffer,
+ retcode = SQLDriverConnect(hdbc, NULL, (SQLTCHAR FAR *)inConnectionStr.c_str(),
+ inConnectionStr.Length(), (SQLTCHAR FAR *)outConnectBuffer,
sizeof(outConnectBuffer), &outConnectBufferLen, SQL_DRIVER_COMPLETE);
if ((retcode != SQL_SUCCESS) &&
#ifdef __WXDEBUG__
wxTablesInUse *tiu;
- wxNode *pNode;
+ wxList::compatibility_iterator pNode;
pNode = TablesInUse.GetFirst();
wxString s,s2;
while (pNode)
#ifdef __WXDEBUG__
default:
wxString errMsg;
- errMsg.Printf(wxT("SQL Data type %d currently not supported by wxWindows"), colInf[colNo].sqlDataType);
+ errMsg.Printf(wxT("SQL Data type %d currently not supported by wxWidgets"), colInf[colNo].sqlDataType);
wxLogDebug(errMsg,wxT("ODBC DEBUG MESSAGE"));
#endif
}