Results 1 to 8 of 8

Thread: [RESOLVED] How to make the SQL server a setting

  1. #1

    Thread Starter
    Frenzied Member cory_jackson's Avatar
    Join Date
    Dec 2011
    Location
    Fallbrook, California
    Posts
    1,104

    Resolved [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.

  2. #2
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,195

    Re: How to make the SQL server a setting

    Are you talking about the connection string?

  3. #3

    Thread Starter
    Frenzied Member cory_jackson's Avatar
    Join Date
    Dec 2011
    Location
    Fallbrook, California
    Posts
    1,104

    Re: How to make the SQL server a setting

    I would think that would be it.

  4. #4

    Thread Starter
    Frenzied Member cory_jackson's Avatar
    Join Date
    Dec 2011
    Location
    Fallbrook, California
    Posts
    1,104

    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?

  5. #5
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,757

    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

  6. #6

    Thread Starter
    Frenzied Member cory_jackson's Avatar
    Join Date
    Dec 2011
    Location
    Fallbrook, California
    Posts
    1,104

    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?

  7. #7

    Thread Starter
    Frenzied Member cory_jackson's Avatar
    Join Date
    Dec 2011
    Location
    Fallbrook, California
    Posts
    1,104

    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?

  8. #8
    Code Monkey wild_bill's Avatar
    Join Date
    Mar 2005
    Location
    Montana
    Posts
    2,993

    Re: How to make the SQL server a setting

    Quote Originally Posted by cory_jackson View Post
    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
  •  



Click Here to Expand Forum to Full Width