Admin Access to SQLConnection class

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey All,

When I log in as admin, i want to be able to set the database properties
(UserName, Password, Database & Server) to be passed to the
SQLClient.SqlConnection class. I have been working with defaults during
development. Now if admin logs in I want to allow them to change the settings
so as they are held from then onwards. This alllows me no not have to change
any code when distributing this App.

So I start with 4 text boxes on my 2nd(Main Form) form - because thewy would
just look out of place on the login or Form3.

I am hard coding these but it's not dynamic and nor practical.
So currantly I set up a Module called dbProps and give it the values from
Form2 TextBoxes mentioned above. This then allows the values to be passed
around the 3 screens.

I toyed with the idea of using a table to hold the connection data but
worked out that I wouldn't be able to connect to it without the values in
that table!! Can I use a trusted connection r something?

The final result is that I do not want "sa", "blank", "DbName" & "SrvName"
to be hard-coded within the app. How do I get around this problem.
 
Hi,

http://msdn.microsoft.com/library/d...riintroductiontoapplicationsettingstorage.asp

Ken
--------------------------
Hey All,

When I log in as admin, i want to be able to set the database properties
(UserName, Password, Database & Server) to be passed to the
SQLClient.SqlConnection class. I have been working with defaults during
development. Now if admin logs in I want to allow them to change the
settings
so as they are held from then onwards. This alllows me no not have to change
any code when distributing this App.

So I start with 4 text boxes on my 2nd(Main Form) form - because thewy would
just look out of place on the login or Form3.

I am hard coding these but it's not dynamic and nor practical.
So currantly I set up a Module called dbProps and give it the values from
Form2 TextBoxes mentioned above. This then allows the values to be passed
around the 3 screens.

I toyed with the idea of using a table to hold the connection data but
worked out that I wouldn't be able to connect to it without the values in
that table!! Can I use a trusted connection r something?

The final result is that I do not want "sa", "blank", "DbName" & "SrvName"
to be hard-coded within the app. How do I get around this problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top