cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sbrown
Level 6

Run SQL Script w/o SQL login dialog

I have an installation that includes 2 sql scripts. One both or neither will run depending on the features selected. One of them needs the sql login but the other does not. Is there any way to disable the sql login screen for one of the scripts?

TIA
Labels (1)
0 Kudos
(4) Replies
hidenori
Level 17

What project type are you using?
0 Kudos
sbrown
Level 6

installscript msi project, 2008 version.
0 Kudos
hidenori
Level 17

You need to modify the OnSQLLogin() event to show the SQLLogin dialog only for one particular connection as follows:


.
.
if(szConnection = 'ConnectionName') then
nResult = SQLServerSelectLogin2( szConnection, szServer, szUser, szPassword, bWinLogin, szDB, FALSE, TRUE );
endif;
.
.
0 Kudos
sbrown
Level 6

That helped alot. It was a little more complicated but that definitely got me where I wanted to be.

Thanks
0 Kudos