Results 1 to 9 of 9

Thread: Storing SQL Con String settings

Hybrid View

  1. #1
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Storing SQL Con String settings

    I think because its easier in code to read in values from it because there are built in functions to obtain data from the app.config file.

    like
    Dim MyConnString as string = ConfigurationSettings.AppSettings("SQLConnString")

    where the app.config looks something like this
    <appSettings>
    <add key="SQLConnString" value="ConnectionStringHere"/>
    </appSettings>

    I wrote all that freehand.. so it might take some modification to actually work.. but u should get the idea zak

  2. #2
    Frenzied Member Zakary's Avatar
    Join Date
    Mar 2005
    Location
    Canada, Quebec, Montreal
    Posts
    1,654

    Re: Storing SQL Con String settings

    Quote Originally Posted by kleinma
    I think because its easier in code to read in values from it because there are built in functions to obtain data from the app.config file.

    like
    Dim MyConnString as string = ConfigurationSettings.AppSettings("SQLConnString")

    where the app.config looks something like this
    <appSettings>
    <add key="SQLConnString" value="ConnectionStringHere"/>
    </appSettings>

    I wrote all that freehand.. so it might take some modification to actually work.. but u should get the idea zak

    Yeah i catch the idea.... it might be easier to read it, but not to write in it, Writing in XML via DataSet is much more easier, and reading form it is not really a big problem too...

    Anyways .. everybody might have is own idea on that ... my 0.02¢
    Using VS 2010 on Fw4.0

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