allow SQLDriverConnect() to open the dialog asking the user for additional info by passing it a (potentially) non NULL HWND (patch 1092583)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-05-22 22:57:15 +00:00
parent cbbb6724af
commit 11bfe4bfdc
2 changed files with 8 additions and 1 deletions

View File

@@ -804,6 +804,11 @@ bool wxDb::open(bool failOnDataTypeUnsupported)
bool wxDb::Open(const wxString& inConnectStr, bool failOnDataTypeUnsupported)
{
wxASSERT(inConnectStr.Length());
return Open(inConnectStr, NULL, failOnDataTypeUnsupported);
}
bool wxDb::Open(const wxString& inConnectStr, SQLHWND parentWnd, bool failOnDataTypeUnsupported)
{
dsn = wxT("");
uid = wxT("");
authStr = wxT("");
@@ -832,7 +837,7 @@ bool wxDb::Open(const wxString& inConnectStr, bool failOnDataTypeUnsupported)
inConnectionStr = inConnectStr;
retcode = SQLDriverConnect(hdbc, NULL, (SQLTCHAR FAR *)inConnectionStr.c_str(),
retcode = SQLDriverConnect(hdbc, parentWnd, (SQLTCHAR FAR *)inConnectionStr.c_str(),
(SWORD)inConnectionStr.Length(), (SQLTCHAR FAR *)outConnectBuffer,
sizeof(outConnectBuffer), &outConnectBufferLen, SQL_DRIVER_COMPLETE );