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
  1. Home
  2. General Programming
  3. Visual Basic
  4. Application Path

Application Path

Scheduled Pinned Locked Moved Visual Basic
databasesysadminhelpquestion
4 Posts 2 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.
  • V Offline
    V Offline
    Vikrant Badhai
    wrote on last edited by
    #1

    Hi there , Can anyone tell me what apppath does? Can I give apppath to my database in VB 6.0. If yes, then what will happen if I change my location of the database from one server to another, and what should I do if in future I want to change my path of the database? Plz help me out. Thanx & Regards. Success is not a Destination, ... But a Journey !!

    M 1 Reply Last reply
    0
    • V Vikrant Badhai

      Hi there , Can anyone tell me what apppath does? Can I give apppath to my database in VB 6.0. If yes, then what will happen if I change my location of the database from one server to another, and what should I do if in future I want to change my path of the database? Plz help me out. Thanx & Regards. Success is not a Destination, ... But a Journey !!

      M Offline
      M Offline
      mr_12345
      wrote on last edited by
      #2

      AppPath gives you the directory path of your executable. If using VB6, you can put your connection string in an ini file or the registry. If using .Net then you can put it in the app.config file or the registry. This way you can easily move your database without recompiling your code. Mike Lasseter

      V 1 Reply Last reply
      0
      • M mr_12345

        AppPath gives you the directory path of your executable. If using VB6, you can put your connection string in an ini file or the registry. If using .Net then you can put it in the app.config file or the registry. This way you can easily move your database without recompiling your code. Mike Lasseter

        V Offline
        V Offline
        Vikrant Badhai
        wrote on last edited by
        #3

        Hi, Sorry but I don't know ur name. First I would like to thank u for ur quik response.But I would b requiring some more help.Plz help. I would like to know in wich ini file should I save the database path,Will I need to give additional attributes of the database like USERID,PASSWORD,LOCKTYPE in that file, and How should I execute that file from the application? Thanx & Regards. Success is not a Destination, ... But a Journey !!

        M 1 Reply Last reply
        0
        • V Vikrant Badhai

          Hi, Sorry but I don't know ur name. First I would like to thank u for ur quik response.But I would b requiring some more help.Plz help. I would like to know in wich ini file should I save the database path,Will I need to give additional attributes of the database like USERID,PASSWORD,LOCKTYPE in that file, and How should I execute that file from the application? Thanx & Regards. Success is not a Destination, ... But a Journey !!

          M Offline
          M Offline
          mr_12345
          wrote on last edited by
          #4

          You can create your own ini file. Example appliationName.ini. I would place this file in the same directory as your executable. As far as placing the user name and password in this file, I don't recommend it (unless you perform some kind of encryption on the password). Are you using one user id to connect to your database or will everyone that logs in have a different user name and password? What kind of database are you trying to connect to? As for reading and writing to an ini file look at the following link or do a search on google http://www.vbcity.com/forums/topic.asp?tid=20423

          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