typo
Posts: 6
Joined: Mon Sep 24, 2012 2:39 am

External SQL Scripts

i have situation here.

i need to build one installer with sql script need to be run in sql server which Advance Installer able to do it.

btw the problem here is the script that will be run will not be the same script each time.

so, i would like to ask if advance installer can just build one installer and when it comes to sql script installation part it will call sql script which come from external source like C:\script.sql.

if you have solution in this problem please help me.

i have Enterprise license.

thank you.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: External SQL Scripts

Hello,

I'm afraid we don't have predefined support for this. However, in order to achieve what you want you can add your SQL script on our SQL Scripts page. Then, if your scripts contain similar statements you can use our script replacements support. In this way you can insert a property value in your SQL script.

Also, if you have a limited number of scripts to be used, then you can add the related scripts on SQL Scripts page and run them selectively by conditioning each of them.

If none of the above solutions aren't suitable for you, then you should create your own custom action which will implement your scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
typo
Posts: 6
Joined: Mon Sep 24, 2012 2:39 am

Re: External SQL Scripts

the statement will be absolutely different and also unlimited. that's the problem.

btw u said that custom action can implement my scenario? so then how can i do it?

i can't see any way to do it.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: External SQL Scripts

Hello,

You can use the sqlcmd Utility to run your SQL scripts. Also, you can place all scripts near your MSI or EXE installer file and then access it using the SOURCEDIR or SETUPEXEDIR properties.

Here are some thread which may be useful for you:
- How to run CMDSQL for SQL scripts
- Browse for SQL script then run it

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”