Results 1 to 5 of 5

Thread: [RESOLVED] Really Stupid app.config Question

  1. #1

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,566

    Resolved [RESOLVED] Really Stupid app.config Question

    I googled this before posting hoping I'd find an answer and not have to embarass myself. I can't find what app.config is for, so I don't know if what I'm thinking about using it for makes sense.

    I run a query against a database and get back a list of companies which I put in a dropdownlist for a user to select. Some of these companies shouldn't be in the list anymore. We have determined that the database shouldn't be changed (e.g. adding an active column) so I am going to load the ddl the way I always have then read a file of companies to remove from the ddl. I am doing something similar in a VB6 program and in .NET I was going to read a text file, but I didn't know if this is something I should put in app.config. Would that be a correct use of it? Or should I use some other xml file instead of a text file?

    Thanks.
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Really Stupid app.config Question

    app.config is the application configuration file. Lots of different types of configuration information can be stored in it; some standard, some custom. You could store that information in the config file but I would probably suggest not. I think a separate file, whether it be XML, plain text or whatever, would be more appropriate.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: Really Stupid app.config Question

    Can you not add a new table to the database with the ignore list and use that in a join to only return from your main list where they are not in the ignore list. That way you do not change the existing table. You could even create a view of it.

  4. #4

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,566

    Re: Really Stupid app.config Question

    No, it's kind of "difficult" to get db stuff changed here, which is why we aren't adding a column to the table. It is easier to create a new file and put it in with the executable than to involve dba's. But thanks for the suggestion.
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  5. #5

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,566

    Re: Really Stupid app.config Question

    Okay, I used an XML file. Thanks.
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

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