This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Hiding SQLServerSelectLoginDlg?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 24, 2008
09:03 AM
Hiding SQLServerSelectLoginDlg?
I am still pretty new to InstallShield 2008.
I am making an InstallScript MSI project in which, after installing the DB engine and the application, I want to call an SQL script to generate the DB schema for the application.
Under SQL Scripts, I have added the script with the relevant settings to connect to the SQLExpress2005 DB.
When installing, the SQLServerSelectLoginDlg automagically appears. All settings are correct, clicking on next does the requested job.
I do not want to show this dialog to the end user. Is there any way to hide/disable/avoid this popup?
Thanks for any help.
I am making an InstallScript MSI project in which, after installing the DB engine and the application, I want to call an SQL script to generate the DB schema for the application.
Under SQL Scripts, I have added the script with the relevant settings to connect to the SQLExpress2005 DB.
When installing, the SQLServerSelectLoginDlg automagically appears. All settings are correct, clicking on next does the requested job.
I do not want to show this dialog to the end user. Is there any way to hide/disable/avoid this popup?
Thanks for any help.
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 24, 2008
12:32 PM
In the InstallScript view, select the Before Move Data | OnSQLLogin event from the dropdown boxes located above the InstallScript editor, and then comment out "nResult = SQLServerSelectLogin2( szConnection, szServer, szUser, szPassword, bWinLogin, szDB, FALSE, TRUE );"
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 25, 2008
03:38 AM
Thank you, finally I did not comment it out, but added some conditions to have it displayed only in case of problems getting connected.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 02, 2008
10:08 AM
is there any chance that you could post the command that you used to do this?
It would be really usefull for a project i am working on.
Cheers
It would be really usefull for a project i am working on.
Cheers
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 04, 2008
01:34 AM
Well, to hide the SQLServerSelectLoginDlg, I did the following in the OnSQLLogin method:
1. declare an additional member BOOL bErrorConnecting
2. inside the method OnSQLLogin, I initialize the bErrorConnecting to false before the while (nResult = ISERR_SUCCESS).
3. inside the while loop, find the line:
nResult = SQLServerSelectLogin2(szConnection, szServer,...)
and replace it with:
if (bErrorConnecting = TRUE) then
nResult = SQLServerSelectLogin2(szConnection, szServer,...) (same line as above)
else
nResult = NEXT;
endif;
In that way, I "simulate" the user pressing on NEXT on the dialog, but should the connection fail, it will display the requester for the second attempt.
4. A bit below is a line like
if ( sTemp != "0") then
...
else
This is the code which is called in case of failure to connecting to the db. all you need is to set bErrorConnecting to TRUE inside this if statement in order to display the connection dialog if the first connection attempt fails.
Hope it helps.
1. declare an additional member BOOL bErrorConnecting
2. inside the method OnSQLLogin, I initialize the bErrorConnecting to false before the while (nResult = ISERR_SUCCESS).
3. inside the while loop, find the line:
nResult = SQLServerSelectLogin2(szConnection, szServer,...)
and replace it with:
if (bErrorConnecting = TRUE) then
nResult = SQLServerSelectLogin2(szConnection, szServer,...) (same line as above)
else
nResult = NEXT;
endif;
In that way, I "simulate" the user pressing on NEXT on the dialog, but should the connection fail, it will display the requester for the second attempt.
4. A bit below is a line like
if ( sTemp != "0") then
...
else
This is the code which is called in case of failure to connecting to the db. all you need is to set bErrorConnecting to TRUE inside this if statement in order to display the connection dialog if the first connection attempt fails.
Hope it helps.