Ive been installing a VB application on another computer, but wen im running the program an error occurs it says that my database is not valid(the path).
my program has no app.path thats why i install it on Local disk D.
Wat should i do now?
is there any option on how can i run the program on another Local computers?
thanks.

Recommended Answers

All 4 Replies

Hi

my program has no app.path thats why i install it on Local disk D

Not sure what you mean by this, Vb6 does have an App.Path method, see the Code Changes to the App Object here for an example.

Also, I would recommend storing this type of information in a configuration file. In Vb6 this was usually done with good old ini files and using the GetPrivateProfileString and WritePrivateProfileString API calls. You can get an example from this article: Accessing Windows Initialisation files from Visual Basic.

HTH

i have the same problem as well, but after install the app says c://.../desktop/project/a.mdb path not available, i know that path is my own computer's path, how to change it to general?

Hi

i know that path is my own computer's path, how to change it to general?

The App.Path method will return the location to where your executable resides. If your database is in the same location as the executable then it should work fine. If however your database is located somewhere else then you will need a mechanism for managing this, such as a configuration file.

thanks djj,
yeah all the files and the database itself are at the same location, in my computer. but when i install it in another app then it shows my computer location and says path is not valid. now show me a way to install it in any computer and work there.

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.