Please help with running executable vb program.


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Please help with running executable vb program.

  1. #1
    Gordon Reichhardt Guest

    Please help with running executable vb program.


    I'm new to VB so please bear with me on this one. I'm having a problem trying
    to make an exe of my vb program. Right now I'm doing this for testing purposes
    only to see how things work. This is an Access 97 database program. When
    I make an exe file of my program in the folder where I developed the program
    I don't have a problem; the program runs perfectly from the exe. However,
    when I move all the files including the exe and Access database (mdb file)
    to a folder on a network drive, the exe gives me an error message that tells
    me my mdb file isn't on a valid path and that I should make sure that the
    path name is spelled correctly and that I am connected to the server on which
    the file resides. Part of the problem is that I have hard coded the path
    of the mdb file into the program. This is only for testing purposes. Later
    I plan the change it so that it doesn't matter where I install the program.
    So what I did was I changed the path in the program to suit the network
    location but I am still getting a reference to the same path from where I
    originally developed the program. Why won't my program run from the exe
    when I change its location? Is it because the project file (.vbp) carries
    a reference to the old location or what? Please set me straight.

  2. #2
    More Info Guest

    Re: Please help with running executable vb program.


    What type of data access are you using (ADO or DAO)?
    What triggers the error (starting the program, a certain screen, etc.)?
    Does the database have linked tables?


    "Gordon Reichhardt" <Reichhardtg@pac.dfo-mpo.gc.ca> wrote:
    >
    >I'm new to VB so please bear with me on this one. I'm having a problem

    trying
    >to make an exe of my vb program. Right now I'm doing this for testing purposes
    >only to see how things work. This is an Access 97 database program. When
    >I make an exe file of my program in the folder where I developed the program
    >I don't have a problem; the program runs perfectly from the exe. However,
    >when I move all the files including the exe and Access database (mdb file)
    >to a folder on a network drive, the exe gives me an error message that tells
    >me my mdb file isn't on a valid path and that I should make sure that the
    >path name is spelled correctly and that I am connected to the server on

    which
    >the file resides. Part of the problem is that I have hard coded the path
    >of the mdb file into the program. This is only for testing purposes. Later
    >I plan the change it so that it doesn't matter where I install the program.
    > So what I did was I changed the path in the program to suit the network
    >location but I am still getting a reference to the same path from where

    I
    >originally developed the program. Why won't my program run from the exe
    >when I change its location? Is it because the project file (.vbp) carries
    >a reference to the old location or what? Please set me straight.



  3. #3
    Sriram Guest

    Re: Please help with running executable vb program.


    Did you try to open the database from the network using Access directly? If
    you cann't, then nothing wrong with your code.


    "More Info" <nohelp@nohelp.com> wrote:
    >
    >What type of data access are you using (ADO or DAO)?
    >What triggers the error (starting the program, a certain screen, etc.)?
    >Does the database have linked tables?
    >
    >
    >"Gordon Reichhardt" <Reichhardtg@pac.dfo-mpo.gc.ca> wrote:
    >>
    >>I'm new to VB so please bear with me on this one. I'm having a problem

    >trying
    >>to make an exe of my vb program. Right now I'm doing this for testing

    purposes
    >>only to see how things work. This is an Access 97 database program. When
    >>I make an exe file of my program in the folder where I developed the program
    >>I don't have a problem; the program runs perfectly from the exe. However,
    >>when I move all the files including the exe and Access database (mdb file)
    >>to a folder on a network drive, the exe gives me an error message that

    tells
    >>me my mdb file isn't on a valid path and that I should make sure that the
    >>path name is spelled correctly and that I am connected to the server on

    >which
    >>the file resides. Part of the problem is that I have hard coded the path
    >>of the mdb file into the program. This is only for testing purposes.

    Later
    >>I plan the change it so that it doesn't matter where I install the program.
    >> So what I did was I changed the path in the program to suit the network
    >>location but I am still getting a reference to the same path from where

    >I
    >>originally developed the program. Why won't my program run from the exe
    >>when I change its location? Is it because the project file (.vbp) carries
    >>a reference to the old location or what? Please set me straight.

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center