visual basic

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ajay00000
    New Member
    • Nov 2007
    • 1

    visual basic

    hello,
    i am a student of BSc computer Hons. and i am preparing a simple project to demonstrate the working of library management.

    My questio is-

    When I use database table in ms access in visual basic. the while running the application there is no problem.
    but when I run the application on another computer I get an error message the
    the database file cannot be found.

    Then I enter new path in database name property.

    But I still getting this problem.


    Plz Help Me.
  • Ali Rizwan
    Banned
    Contributor
    • Aug 2007
    • 931

    #2
    Hi
    I m also doing Bscs Hons but its my first semester and just started over a month ago.

    Copy the app in the same directory you have in yours computer
    For example:



    If you have saved your project as well as .exe file and databases in directory
    D:\My App\

    Then copy it to another pc in same directory like
    D:\My App\

    Now problem is solved.

    If you are loading your database from a directory then use app.path function it will help you a lot

    GOOD LUCK
    ALI

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      You need to avoid hard coding the path of the database file . Use App.Path

      Comment

      • jamesd0142
        Contributor
        • Sep 2007
        • 471

        #4
        Originally posted by debasisdas
        You need to avoid hard coding the path of the database file . Use App.Path
        yes i had this problem in the past, as debasisdas said, use app.path and when you publish the project there is a way to publish the .mdb file with your project, which i have forgotten how to do :s

        Comment

        Working...