summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorHiroshi Inoue2006-10-23 15:58:29 +0000
committerHiroshi Inoue2006-10-23 15:58:29 +0000
commit9a37876fccbef0da8b27d9a335412a36eafec7f2 (patch)
tree0f45913ae37007f5c7e1307dea79fde191d400b7 /setup.c
parent09716427f45b460378e5eb0ff7f68537abedcf21 (diff)
The version is now 8.2.0105.
1. SQLStatistics now returns indices based on expression also. 2. Add a TEST button on the setup dialog.
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/setup.c b/setup.c
index 94d91e1..450e85f 100644
--- a/setup.c
+++ b/setup.c
@@ -20,6 +20,7 @@
#include <string.h>
#include <stdlib.h>
#include "resource.h"
+#include "pgapifunc.h"
#include "dlg_specific.h"
#include "win_setup.h"
@@ -284,6 +285,39 @@ ConfigDlgProc(HWND hdlg,
EndDialog(hdlg, wParam);
return TRUE;
+ case IDC_TEST:
+ {
+ lpsetupdlg = (LPSETUPDLG) GetWindowLong(hdlg, DWLP_USER);
+ if (NULL != lpsetupdlg)
+ {
+ ConnectionClass *conn=CC_Constructor();
+ char szMsg[SQL_MAX_MESSAGE_LENGTH];
+
+ /* Get Dialog Values */
+ GetDlgStuff(hdlg, &lpsetupdlg->ci);
+ if (conn)
+ {
+ char *emsg;
+
+ memcpy(&conn->connInfo, &lpsetupdlg->ci, sizeof(ConnInfo));
+ if (CC_connect(conn, AUTH_REQ_OK, NULL) > 0)
+ {
+ strncpy(szMsg, "Connection successful", sizeof(szMsg));
+ emsg = szMsg;
+ }
+ else
+ {
+ int errnum;
+
+ CC_get_error(conn, &errnum, &emsg);
+ }
+ MessageBox(lpsetupdlg->hwndParent, emsg, "Connection Test", MB_ICONEXCLAMATION | MB_OK);
+ CC_Destructor(conn);
+ return TRUE;
+ }
+ }
+ break;
+ }
case IDC_DATASOURCE:
lpsetupdlg = (LPSETUPDLG) GetWindowLong(hdlg, DWLP_USER);
DialogBoxParam(s_hModule, MAKEINTRESOURCE(DLG_OPTIONS_DRV),