Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. connection parameters in configuration file

connection parameters in configuration file

Scheduled Pinned Locked Moved Database
helpquestiondatabasexmlarchitecture
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fadi Yoosuf
    wrote on last edited by
    #1

    hi, I have a program which does some operations with database.(Single tier architecture) I will sometimes have to move the application to other systems having the database. In order to make the database connection parameters configurable, i am storing the params such as username, password etc. in an xml file. Is it the correct way to handle the situation? If so will it be safe to store the database password in an xml file? how can i solve the issue? If the application is meant for ordinary users(who may not have the database files), how can we approach the problem? Cconfiguration file will not be easy for him to edit no? Thank you Fadi

    L M 2 Replies Last reply
    0
    • F Fadi Yoosuf

      hi, I have a program which does some operations with database.(Single tier architecture) I will sometimes have to move the application to other systems having the database. In order to make the database connection parameters configurable, i am storing the params such as username, password etc. in an xml file. Is it the correct way to handle the situation? If so will it be safe to store the database password in an xml file? how can i solve the issue? If the application is meant for ordinary users(who may not have the database files), how can we approach the problem? Cconfiguration file will not be easy for him to edit no? Thank you Fadi

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Fadi Yoosuf wrote:

      Is it the correct way to handle the situation?

      There is no "correct way". It is a good idea to store it in a configuration-file, since it makes it easier to change.

      Fadi Yoosuf wrote:

      If so will it be safe to store the database password in an xml file?

      Yes and no. It might be safe on a NTFS-partition, depending on the settings. Passwords are rarely written into a file as plain text, so you could encrypt it if you wanted more security.

      Fadi Yoosuf wrote:

      how can i solve the issue?

      Switch to "Windows Authentication Mode", and you won't need to save a password. This would require just a small change in your connection-string. Use "integrated security" instead of the username/password combination.

      I are troll :)

      1 Reply Last reply
      0
      • F Fadi Yoosuf

        hi, I have a program which does some operations with database.(Single tier architecture) I will sometimes have to move the application to other systems having the database. In order to make the database connection parameters configurable, i am storing the params such as username, password etc. in an xml file. Is it the correct way to handle the situation? If so will it be safe to store the database password in an xml file? how can i solve the issue? If the application is meant for ordinary users(who may not have the database files), how can we approach the problem? Cconfiguration file will not be easy for him to edit no? Thank you Fadi

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        This is a standard approach and can be handled by using encrypted passwords, encrypting the config file or putting the password into the registry (not recommended these daya).

        Never underestimate the power of human stupidity RAH

        F 1 Reply Last reply
        0
        • M Mycroft Holmes

          This is a standard approach and can be handled by using encrypted passwords, encrypting the config file or putting the password into the registry (not recommended these daya).

          Never underestimate the power of human stupidity RAH

          F Offline
          F Offline
          Fadi Yoosuf
          wrote on last edited by
          #4

          Thank you very much for the info. But I wish to know one more thing. How huge applications like encyclopedias stores information? If they store in database, how is it possible to install them, without having the database server in the system?

          M 1 Reply Last reply
          0
          • F Fadi Yoosuf

            Thank you very much for the info. But I wish to know one more thing. How huge applications like encyclopedias stores information? If they store in database, how is it possible to install them, without having the database server in the system?

            M Offline
            M Offline
            Mycroft Holmes
            wrote on last edited by
            #5

            Fadi Yoosuf wrote:

            How huge applications like encyclopedias stores information?

            These apps distribute a database with the app and are considered single user applications. A DB like SQL Express, Access or there are a few other small, single user databases out there.

            Never underestimate the power of human stupidity RAH

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups