-
Jul 31st, 2015, 06:28 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] How to make the SQL server a setting
I created a DataSet in my project and things are working great. Now I want to know how to make the SQL Server a user configurable setting. It seems that it should be defined in the DataSet's properties since the adapters are generated from it but I don't see it. I used the Data Connection Wizard.
-
Jul 31st, 2015, 08:25 PM
#2
Re: How to make the SQL server a setting
Are you talking about the connection string?
-
Aug 2nd, 2015, 06:45 PM
#3
Thread Starter
Frenzied Member
Re: How to make the SQL server a setting
I would think that would be it.
-
Aug 2nd, 2015, 06:55 PM
#4
Thread Starter
Frenzied Member
Re: How to make the SQL server a setting
I was reading on MSDN that the wizard adds a My.Settings for the connection string. I see now there was one added. Cool. So all I have to do is modify that at run time?
-
Aug 2nd, 2015, 07:13 PM
#5
Re: How to make the SQL server a setting
Yea that would work. Keep in mind that My.Settings are exposed to users in an xml file which can create a security issue if the string is not encrypted. Take a look at this link to see the location the file is stored.
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Aug 2nd, 2015, 07:21 PM
#6
Thread Starter
Frenzied Member
Re: How to make the SQL server a setting
That's a really good point and I was just reading about that in the MSDN. But since I'm using Windows integrated security I don't have to save credentials in the connection string. I shoudl be OK in that case, right?
-
Aug 2nd, 2015, 07:24 PM
#7
Thread Starter
Frenzied Member
Re: How to make the SQL server a setting
I was looking at the SqlConnectionStringBuilder class, is this a better way than just simple string manipulation?
-
Aug 4th, 2015, 10:59 AM
#8
Re: How to make the SQL server a setting
Originally Posted by cory_jackson
I was looking at the SqlConnectionStringBuilder class, is this a better way than just simple string manipulation?
You got it, use the SqlConnectionBuilder.
That is the very essence of human beings and our very unique capability to perform complex reasoning and actually use our perception to further our understanding of things. We like to solve problems. -Kleinma
Does your code in post #46 look like my code in #45? No, it doesn't. Therefore, wrong is how it looks. - jmcilhinney
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|