By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,347 Members | 2,113 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,347 IT Pros & Developers. It's quick & easy.

Publishing project

jamesd0142
100+
P: 469
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
Sep 14 '07 #1
Share this Question
Share on Google+
2 Replies


P: 2
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@kpitcummins.com)
Sep 14 '07 #2

jamesd0142
100+
P: 469
Thanks for your reply,

Could you please correct me if im wrong:

1. The new source is "& Application.StartupPath & "\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\debug\ how can i change this to only look as far as the pasthname and not in the bi\debug directory?

thanks James
Sep 14 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.