Publishing project

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamesd0142
    Contributor
    • Sep 2007
    • 471

    Publishing project

    Hi i have a program which retrieves and copies data to and from a database. the database is located in the project bin/debug folder.

    When i publish the project and run on a different machine i get error cant find database (or along the lines of that).

    Why doesnt the database get published with the programme?
    Or how can i do this correctly?

    Thanks James
  • Jawad Ali
    New Member
    • Sep 2007
    • 2

    #2
    Originally posted by jamesd0142
    Hi i have a program which retrieves and copies data to and from a database. the database is located in the project bin/debug folder.

    When i publish the project and run on a different machine i get error cant find database (or along the lines of that).

    Why doesnt the database get published with the programme?
    Or how can i do this correctly?

    Thanks James
    HI Jamesh,

    First make practice of keeping the database(*.mdb) in the path where ur project files exists and use app.path\*.mdb to access it.

    then copy the database along with the projectfiles in any system it will work.

    If you are creating a setup package using package and deployment wizard, you'll have to include the database file along in the setup(option will be available while creating the setup). Then once you install the application in any system database will also be copied in the installation path.

    Hope it solves your problem

    Regards
    Jawad Ali(jawada@kpit cummins.com)

    Comment

    • jamesd0142
      Contributor
      • Sep 2007
      • 471

      #3
      Thanks for your reply,

      Could you please correct me if im wrong:

      1. The new source is "& Application.Sta rtupPath & "\FAQs.mdb; "
      (this is the vb.net version of the app.path you advised me to use). seems to work well.

      2. i save the *mdb file to to project folder where all vb.net forms are saved etc.

      3. i now get the message mdb file cannot be found in PATHNAME\bin\de bug\ how can i change this to only look as far as the pasthname and not in the bi\debug directory?

      thanks James

      Comment

      Working...