Visual Studio Deployment Project with SQL Scripts to install


I am using a program in Visual Studio 2010 which needs some SQL Databases and tables required to run the application. I have setup the Installer for this project using Visual Studio 2010 Deployment and Setup project. The project is creating the Setup.exe and Setup.msi file and I can install the application from fine.

The issue with this is, I can't install the SQL objects like Databases and Tables required for this application. I can't Do this manually. I want to use Visual Studio Packager to install this using Scripts. Please help me to get a solution.

I found a way that we can create "Custom Dialogs" for the installer and the installer will popup the dialog while setup going on. But I can't do this for SQL. Can you help me to create an SQL page for entering Servername, User, Password, etc.

Please help me on this regard.

Thank you
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

>But I can't do this for SQL. Can you help me to create an SQL page for entering Servername, User, Password, etc.

Why not? You can create a dialog to get those details from user and then launch an executable with those details to run the scripts.

You can also get your application to run the scripts if it finds out that the database is not setup.
gopalvAuthor Commented:
Thanks CodeCruiser.  To give you some background, we have thus far been using Installshield for our setup packages and there is a built in dialog box within IS that does all this. All we need to do is to enable it. It then takes care of the getting the credentials from the user and executing the scripts we add to the package.

I was checking to see if there is a similar option in VS deployment tool but I guess not. We discussed the option you suggested (launching from a separate executable)  but wanted to check if there was a "built in" feature that we were missing.

Thanks for your response.
Generally speaking, InstallShield would provide more functionality than VS as they are the specialists. See if following works for you

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.