Hello all,
I have created a pharmacy application in vb6, i packaged that, itselt has an access database. it works well in my pc, but when i want to send it to another computer, it installs there but dose'nt work there and says: C:// desktop/main/pharmacy.mdb is not a valid path, make sure you have spelled the path name correctly..., What is the problem? my package has all the files needed for the setup, but it dose'nt work. i know this is an old topic, but i really need it, Please help me.

Sir, i have also the same problem

do not hardcode your database path.

Just make your setup structure like this:

App.exe (your compiled app)
database\db.mdb (your database)

Then on your code where you connect to database, you can do it like this:
App.path & "\database\db.mdb"

thats it. hope it helps.

thanks jhai,
but still when i want to install my setup in another pc it still says: This is not a valid path. that path belongs to my pc.

i made it through package and deployment software, yeah i am sure all the files are included, but i think the problem is at app.path, when i install the software in any other pc, it shows me my own pc path. i did'nt understand your code snippet link.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.