trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ry...@apache.org
Subject [1/2] incubator-trafodion git commit: [TRAFODION 1441] Cancel button dismisses the SQLDriverConnect prompt dialog but still tries to establish connection.
Date Thu, 20 Oct 2016 07:45:12 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 85eaa6f1e -> 624bafbd0


[TRAFODION 1441]
Cancel button dismisses the SQLDriverConnect prompt dialog but still tries to establish connection.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/95d4a88d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/95d4a88d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/95d4a88d

Branch: refs/heads/master
Commit: 95d4a88de58b4a1bed62d0a07f12fe098a72a49a
Parents: b12b45e
Author: rwbzx <xiang.zhang@esgyn.cn>
Authored: Mon Oct 17 12:03:05 2016 +0800
Committer: rwbzx <xiang.zhang@esgyn.cn>
Committed: Mon Oct 17 12:03:05 2016 +0800

----------------------------------------------------------------------
 win-odbc64/odbcclient/drvr35/cconnect.cpp | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/95d4a88d/win-odbc64/odbcclient/drvr35/cconnect.cpp
----------------------------------------------------------------------
diff --git a/win-odbc64/odbcclient/drvr35/cconnect.cpp b/win-odbc64/odbcclient/drvr35/cconnect.cpp
index 05714b9..6cc6175 100644
--- a/win-odbc64/odbcclient/drvr35/cconnect.cpp
+++ b/win-odbc64/odbcclient/drvr35/cconnect.cpp
@@ -1086,7 +1086,7 @@ INT_PTR CALLBACK ConnectDriverKWDialogProc(
 			PostMessage(hwndDlg,WM_QUIT,0,0);
 			break;
 		case IDCANCEL:
-			PostMessage(hwndDlg,WM_QUIT,0,0);
+			PostMessage(hwndDlg,WM_QUIT,1,0);
 			break;
 		}
 		return TRUE;
@@ -1761,10 +1761,16 @@ SQLRETURN CConnect::DriverConnect(SQLHWND WindowHandle,
 					 DispatchMessage(&msg);
 				 }
 				}
+				
 				DestroyWindow(hWndDlg);
 				EnableWindow(WindowHandle,!b);
-
 				FreeLibrary(hinst);
+
+				if (msg.wParam == 1)//IDCANCEL
+				{
+					setDiagRec(DRIVER_ERROR, IDS_HY_000, 0, "Operation Aborted.");
+					return SQL_ERROR;
+				}
 			 }
 			 else {
 				BOOL b=EnableWindow(WindowHandle,FALSE);
@@ -1783,8 +1789,13 @@ SQLRETURN CConnect::DriverConnect(SQLHWND WindowHandle,
 				}
 				DestroyWindow(hWndDlg);
 				EnableWindow(WindowHandle,!b);
-
 				FreeLibrary(hinst);
+
+				if (msg.wParam == 1)//IDCANCEL
+				{
+					setDiagRec(DRIVER_ERROR, IDS_HY_000, 0, "Operation Aborted.");
+					return SQL_ERROR;
+				}
 			 }
 
 		}


Mime
View raw message