Results 1 to 2 of 2

Thread: help

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2000
    Posts
    46

    Unhappy

    Bear with me here....It's going to be a tough explanation.

    I have a VB program that uses an access backend to store data. What I am trying to do is avoid hard coding the location of the database directly into VB (encase the location of the program changes). For instance, I am using this program in 2 different offices. So I had to create 2 different exe files, one with the path for office A and the other for the path of office B. What I am hoping to do is install the database in the same folder with the exe and everything run ok without hard coding the location.

    I know this has to be possible. I'm just not sure what it is or what it is even called. Can you shed some light on this?

  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    Create a directory called DB in the directory your application is installed in. Then, in your program, you reference that location by:

    filename= App.Path & "\DB\myDB.mdb"

    Won't matter where the user installs the application...

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