cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gridman
Level 8

Executing SQL Scripts in InstallScript

In Basic MSI projects, I have never had a problem executing SQL scripts in the SQL Scripts view of the IDE.

I am working on an InstallScript project now, and am having problems using the SQL Scripts view. During installation, I get an error for a script that is populating a database. Now this script executes fine when I do it from SQL Server Management Studio, so I know it is okay.

From looking at previous posts, the opinion I have come to is that more success has been had when you make SQL calls from the script, rather than by using the SQL Scripts view.

Is that correct?
Labels (1)
0 Kudos
(2) Replies
hidenori
Level 17

Can you try running the script during login and see if it solves the issue? You can change the script execution option in the Script | Runtime tab of the SQL Scripts view. If the script contains multiple statements, please move the statement populating a database to a new script file, and have the rest of statements run during installation.
0 Kudos
gridman
Level 8

Thanks for the help. That solved the problem.
0 Kudos