Page 1 of 1

Connecting to existing SQL DB

Posted: Mon May 21, 2012 7:00 pm
by ScottS
I'm using IA 2012. I have a web-based application we use that the current update process is lengthy and clunky. What I would like to do is build an installer that copies over the new code for the web apps and execute one to two scripts against the existing DB used by the .NET app. I want to have the user be able to specify what DB in MSSQL to connect to when doing the install since each client install has a different DB Name. Using the MSSQL template,I've created a new variable $DBNAME$ and created a dialog box for it on the sqlinstance dialog. Not sure where to go from here.

Re: Connecting to existing SQL DB

Posted: Tue May 22, 2012 7:53 am
by FrancescoT
Dear Scott,

I'm not sure which exactly is your question.

Do you want to create a dialog to let the user select the db-name from a predefined list?

Regards

Re: Connecting to existing SQL DB

Posted: Tue May 22, 2012 8:30 am
by ScottS
Thanks for the reply. In a nutshell, yes. What I would like to do is connect to an MSSQL server, retrieve the existing DBs on the specified server and then be able to select one to run scripts against, OR , be able to select a MSSQL server instance (I know I can do that with the MS SQL template) and then be able to specify the DB to connect to by entering in the db name. Basically, we have a .NET app with an SQL backend that we distribute to companies. The old way of installing it was all manual - manually create db, copy files, etc. I've built an installer using IA that now automates all of it (and it works great, thanks for an excellent product!). I can make an installer that will 'update' those clients because the installer has standardized the DB name, dbo.owner, etc. What I need to do is create an installer that will 'update' existing clients who have a db name different than what I've standardized. Right now when we have a new release, we send out new web app code and several sql scripts that must manually be run against the client's DB in Management Studio. If I could have an installer that would copy the new files over for them and then execute the sql scripts, that would cut support time greatly. Thanks!

Re: Connecting to existing SQL DB

Posted: Tue May 22, 2012 10:17 am
by FrancescoT
Dear Scott,

for what I see, using a dialog with a combobox with a predefined list and then binding it with a variable, it should solve your needs.

To have a combobox with a variable bindig example, you can refer to the following topic;
http://www.installaware.com/forum/viewt ... f=2&t=6127

I'm wrong?

Regards

Re: Connecting to existing SQL DB

Posted: Tue May 22, 2012 1:18 pm
by ScottS
That might be the solution, thanks! I'll give it a shot and see how it goes. Appreciate your time:)

Re: Connecting to existing SQL DB

Posted: Wed May 23, 2012 7:08 am
by FrancescoT
:D