Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

SQLServerSelectLogin screen validations


No replies to this topic

sannareddy

sannareddy
  • Full Members
  • 4 posts

Posted 13 June 2012 - 11:51

Hi

I am using installshield2011 ,my project is Install Script MSI Project.

In my project name is DB installer,under that i have two dialogs

1. SQLServerSelectLogin

2.SdSQLServerDetail

In First screen i am giving the values is

DBServer installing to:iLMSDB

SQL Server authentication :LoginId:-Sa
Password:Sa

When you click on Next Button it will moving to the next screen means(SdSQLServerDetail).

Here
my requirement is when you giving the values is incorrect, the screen is not moving to the next screen .it will show the server validation message .

But in my project i am given the empty values and click on next button the screen is automatically move to the next screen.

My installscript code is for i am giving the dialog name in Setup.rul is

Dlg_SdSQL:
szConnection="";
szServer="";
//bvWindowsLogin="";
//szMsg=""

nResult=SdSQL(0);
//nResult = SQLServerSelectLogin( nResult);
if( nResult = BACK ) goto Dlg_SdWelcome;
svServer = "";
svUser = "";
svPassword="";*/

------------------------------------------------
SQL.rul

#include "ifx.h"
#include "isrt.h"
#include "iswi.h"

#define RES_DIALOG_ID1 10109 // ID of the custom dialog box
#define RES_PBUT_NEXT 1 // ID of NextTextBox button
#define RES_PBUT_CANCEL 9 // ID of Cancel button
#define RES_PBUT_BACK 12 // ID of Back button
#define RES_TEXT_SERVER 17815 // ID of DB Server TextBox
#define RES_TEXT_LOGINID 301 // ID of LOGIN ID TextBox
#define RES_TEXT_PASWORD 305 // ID of Password

STRING svServer,svUser,svPassword,svConnection;


export prototype NUMBER SdSQL(HWND);

function NUMBER SdSQL(hMSI)
STRING szDialogName, szMsg,svResult, szDir,szDir1,szDir2,szDir3,szDir4,szTitle, szPath, szServer, sziLMS,sAuth;
NUMBER nResult, nCmdValue,nSize,nMessage,nId,nRetVal;
BOOL bDone, bFolderExists,bWinAuth;
LIST listIISWebSite;
STRING szUNC_AppThemes, szUNC_Debuglog, szUNC_Content,szUNC_iLMS, szUNC_AdhocReports,szUNC_Logon,szUNC_Language, szUNC_FTPClient;
HWND hwndNext,hwndDlg, hInstall,hEditName, hEditPassword;
begin


//SQLRTInitialize("");
szDialogName = "SdSQL";
//bWinAuth = FALSE;
//bWinAuth =TRUE;
nResult = EzDefineDialog (szDialogName, "", "", RES_DIALOG_ID1);
if (nResult < 0) then
MessageBox ("Error in defining dialog box", SEVERE);
abort;
endif;
bDone = FALSE;
repeat
ShowDialog: // Show login dialog

nCmdValue = WaitOnDialog (szDialogName);
switch (nCmdValue)
case DLG_CLOSE:
Do (EXIT);
case DLG_ERR:
MessageBox ("Unable to display dialog box. Setup canceled.", SEVERE);
abort;
case DLG_INIT:

CtrlSetText(szDialogName, RES_TEXT_SERVER , svServer);

CtrlSetText(szDialogName, RES_TEXT_LOGINID, svUser );

CtrlSetText(szDialogName, RES_TEXT_PASWORD, svPassword);

hwndDlg = CmdGetHwndDlg (szDialogName);
hwndNext = CtrlGetDlgItem("", hwndDlg, NEXT );

SdSetDlgTitle(szDialogName, hwndDlg, szTitle);

case RES_TEXT_SERVER:
nMessage = CtrlGetSubCommand(szDialogName);
if(nMessage = EDITBOX_CHANGE) then
CtrlGetText(szDialogName, RES_TEXT_SERVER, svServer);
EnableWindow( hwndNext, StrLengthChars( svServer ) && StrLengthChars( svUser ) && StrLengthChars( svPassword ));
endif;

case RES_PBUT_NEXT:

CtrlGetText(szDialogName, RES_TEXT_SERVER, szDir);
MsiSetProperty ( ISMSI_HANDLE , "SQL_SERVER" , szDir );
svServer=szDir;

CtrlGetText(szDialogName, RES_TEXT_LOGINID, szDir3);
MsiSetProperty ( ISMSI_HANDLE , "SQL_LOGINID" , szDir3 );
svUser=szDir3;

CtrlGetText(szDialogName, RES_TEXT_PASWORD, szDir4);
MsiSetProperty ( ISMSI_HANDLE , "SQL_PASWORD" , szDir4 );
svPassword=szDir4;

bDone = TRUE;
//MessageBox("Enter The Database Server",SEVERE);

case RES_PBUT_CANCEL:
Do (EXIT);
case RES_PBUT_BACK:
nCmdValue = BACK;
bDone = TRUE;
endswitch;
until bDone;

//sendvals(svServer,svUser,svPassword);

EndDialog (szDialogName);
ReleaseDialog (szDialogName);
return nCmdValue;

end;

Can you help me


Regards
S.N.R