Where to store connection info

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rob

    #1

    Where to store connection info

    The app.config in VB 2005 appears to be riddled with bugs....

    From solution explorer I right click on the Project | Properties... then I
    use the grid to add the app settings... AND they are saved in the
    app.config.xml as well, however, the program uses the value that were
    originally stored in the settings.

    I have run the Build and Saved the file, I even exited and re-opened the
    program as well as rebooted the machine.

    I have no idea where it is getting the original values from, however, when I
    double click on the app.config I get many messages stating that it "Could
    not find schema information for this element or that attribute". Could the
    xsd be corrupt ? How to fix ?

    I am about to give up on using the app.config... is my only other option to
    store the connections as Public variables in a startup routine ?


  • Mr. Arnold

    #2
    Re: Where to store connection info


    "Rob" <robc1@yahoo.co mwrote in message
    news:LpKdnVlOvo S5YxPbnZ2dnUVZ_ gGdnZ2d@comcast .com...
    The app.config in VB 2005 appears to be riddled with bugs....
    >
    From solution explorer I right click on the Project | Properties... then I
    use the grid to add the app settings... AND they are saved in the
    app.config.xml as well, however, the program uses the value that were
    originally stored in the settings.
    The program is using appname.exe.con fig is where it's getting its app.config
    information.

    App.config in the project is just a template and appname.exe.con fig is built
    when the exe is built, which appname.exe.con fig is built from app.config.

    So, if you don't move appname.exe.con fig to wherever appname.exe is located,
    then the appname.exe is going to use the old appname.exe.con fig with old
    settings.
    >
    I have run the Build and Saved the file, I even exited and re-opened the
    program as well as rebooted the machine.
    >
    I have no idea where it is getting the original values from, however, when
    I double click on the app.config I get many messages stating that it
    "Could not find schema information for this element or that attribute".
    Could the xsd be corrupt ? How to fix ?
    I am not having that problem when double clicking the app.config in the
    project, the file in the project location on the HD or the
    appname.exe.con fig on the HD where the appname.exe is located to open the
    file up in the IDE.
    >
    I am about to give up on using the app.config... is my only other option
    to store the connections as Public variables in a startup routine ?
    I am using VB 2005 Express with no problems in this area in using an
    app.config file in a VB.NET project.

    Comment

    • Rob

      #3
      Re: Where to store connection info

      Thank you so much for taking the time to respond... I have worked all day on
      this...

      So may I edit this file directly ? I think I like the VS 2003 solution
      better...

      Rob


      "Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
      news:esXHesEwHH A.2040@TK2MSFTN GP03.phx.gbl...
      >
      "Rob" <robc1@yahoo.co mwrote in message
      news:LpKdnVlOvo S5YxPbnZ2dnUVZ_ gGdnZ2d@comcast .com...
      >The app.config in VB 2005 appears to be riddled with bugs....
      >>
      >From solution explorer I right click on the Project | Properties... then
      >I use the grid to add the app settings... AND they are saved in the
      >app.config.x ml as well, however, the program uses the value that were
      >originally stored in the settings.
      >
      The program is using appname.exe.con fig is where it's getting its
      app.config information.
      >
      App.config in the project is just a template and appname.exe.con fig is
      built when the exe is built, which appname.exe.con fig is built from
      app.config.
      >
      So, if you don't move appname.exe.con fig to wherever appname.exe is
      located, then the appname.exe is going to use the old appname.exe.con fig
      with old settings.
      >>
      >I have run the Build and Saved the file, I even exited and re-opened the
      >program as well as rebooted the machine.
      >>
      >I have no idea where it is getting the original values from, however,
      >when I double click on the app.config I get many messages stating that
      >it "Could not find schema information for this element or that
      >attribute". Could the xsd be corrupt ? How to fix ?
      >
      I am not having that problem when double clicking the app.config in the
      project, the file in the project location on the HD or the
      appname.exe.con fig on the HD where the appname.exe is located to open the
      file up in the IDE.
      >>
      >I am about to give up on using the app.config... is my only other option
      >to store the connections as Public variables in a startup routine ?
      >
      I am using VB 2005 Express with no problems in this area in using an
      app.config file in a VB.NET project.
      >

      Comment

      • Mr. Arnold

        #4
        Re: Where to store connection info


        "Rob" <robc1@yahoo.co mwrote in message
        news:tuudnfLkPs 1zihLbnZ2dnUVZ_ uCinZ2d@comcast .com...
        Thank you so much for taking the time to respond... I have worked all day
        on this...
        >
        So may I edit this file directly ? I think I like the VS 2003 solution
        better...
        You can use the System.Configur ationManager namespace in .Net Framework 2.0
        to manipulate/write/read appname.exe.con fig or you can do it manually. It
        will even get the connection string data with ease.

        Lookup ConfigurationMa nager on Google which should give you examples as to
        what you can do with ConfigurationMa nager.

        Regardless of it being 2003 or 2005, what the program is using is
        appname.exe.con fig, and app.config is just a template to build
        appname.exe.con fig.

        In 2003 using Framework 1.1 would have needed to download and install the
        Application Block. Now, it's part of the 2.0 Framework.


        <snipped>

        Comment

        • Rob

          #5
          Re: Where to store connection info

          Thanks Again ! You really saved me a lot of time....
          -Rob


          "Mr. Arnold" <MR. Arnold@Arnold.c omwrote in message
          news:OM0M3DIwHH A.3588@TK2MSFTN GP06.phx.gbl...
          >
          "Rob" <robc1@yahoo.co mwrote in message
          news:tuudnfLkPs 1zihLbnZ2dnUVZ_ uCinZ2d@comcast .com...
          >Thank you so much for taking the time to respond... I have worked all day
          >on this...
          >>
          >
          >
          >So may I edit this file directly ? I think I like the VS 2003 solution
          >better...
          >
          You can use the System.Configur ationManager namespace in .Net Framework
          2.0 to manipulate/write/read appname.exe.con fig or you can do it manually.
          It will even get the connection string data with ease.
          >
          Lookup ConfigurationMa nager on Google which should give you examples as to
          what you can do with ConfigurationMa nager.
          >
          Regardless of it being 2003 or 2005, what the program is using is
          appname.exe.con fig, and app.config is just a template to build
          appname.exe.con fig.
          >
          In 2003 using Framework 1.1 would have needed to download and install the
          Application Block. Now, it's part of the 2.0 Framework.
          >
          >
          <snipped>

          Comment

          Working...