Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Jul 2001
    Thanked 0 Times in 0 Posts

    Finding the right path (VB6)

    I have written a small program that can be installed on any desktop, I have used the wizard to make the deployment package. However, I included in this package a small access database also. Since I do not know where the user will install the entire package I cannot hardcode the location of the database. So my question there any code I can write that will tell me the current directory that the program is running in? Also, supposed the user moves the database somewhere else, what is the code that will find it on the hardrive?

    Thanks everyone

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Sacramento, California, USA
    Thanked 1 Time in 1 Post

    Re: Finding the right path (VB6)

    In VB code, you can use App.Path to return the path of the current VB application. If you set your installation up so that the database gets installed into the same folder as the VB executable, you shouldn't have any problem refreshing the links. If they move just the mdb, it's their fault for breaking the application. You'll find that most applications have files that must be in particular locations to work. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts