Page 1 of 1

Link SQL DB/Password to a GUI

Posted: Wed Nov 09, 2011 6:34 am
by House
Hi

I am trying to create a GUI so that the user can simply put in there MS SQL Username, Password, Server, Instance and Database in to the fields and then the installer will use this information to run scripts against the database.

Is this possible? and is there a document showing how to do this already? if not could you please help me?

Thanks

Re: Link SQL DB/Password to a GUI

Posted: Wed Nov 09, 2011 9:34 am
by giaviv
Hi,

It is definitely possible - try creating a setup from the Creating IIS Web Sites and Folders template.
It contains a dialog for asking the user for IIS information, which is very similar to what you are trying to do.

Re: Link SQL DB/Password to a GUI

Posted: Fri Nov 11, 2011 4:14 am
by House
Ok thank you,

:)

Re: Link SQL DB/Password to a GUI

Posted: Mon Nov 14, 2011 9:08 am
by House
Hi

I used your advice to use the IIS template and got a bit more of a understanding but i am still stuck.

I was wondering if something like the following is possible

If Variable SelectedServer equals (there sql server)
and
if Variable SQLUSER Equals (what ever there username is)
and
if Variable SQLPassword Equals (there password)
then
Microsoft SQL Server Script: connect to database(database they entered) on instance (instance they entered) as user ( user they entered) etc etc etc

Is this possible or have I set my hopes to high?

Thanks

Re: Link SQL DB/Password to a GUI

Posted: Mon Nov 14, 2011 10:11 am
by BobSchaefer
I can attest to the fact that you can do what you want, I do it on a regular basis in our installer. I'm kind of confused as to why you think its so hard? You just do exactly what you typed in and it should be fine.

Re: Link SQL DB/Password to a GUI

Posted: Mon Nov 14, 2011 11:02 am
by House
ok thanks, I did try this but it did not work.

im currently trying different ways of doing this.

Re: Link SQL DB/Password to a GUI

Posted: Wed Nov 16, 2011 12:03 pm
by BobSchaefer
What is the error you're getting? If you post back some further details, we might be able to help figure out what's going wrong.