Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

deploying a vb application ???

Status
Not open for further replies.

dubble07

Programmer
May 8, 2002
12
CA
g,day

i'm new to the vb world and was wondering if someone could fill me in on the necessary steps involved in migrating a vb application. We are trying to take an exe that exists on one of our machines and relocate it to our server. I have tried copying and pasting the project (with its forms), compiling and then running it, but continue to get errrors (error 53 i believe). I know that im likely missing some dll's or ocx's and was wondering what steps in the migration process i'm missing. How do you find out, for eg, which dlls or ocxs are req'd ? How can i create an exe and distribute it either to our server or to our client's machines?

thanks in advance!!

Steve




 
Sounds as if the original author might have hard-coded the target directory for one or more assets, most likely the database containing the program's tables. Error 53 correlates to "File not found," so you'll want to go through your controls which contain properties pointing to external files (such as data controls) to see if the location isn't pointing, for example, to "C:\MyProgramFolder\MyDataFolder\MyData.mdb." To solve this problem, dimension a database variable and set it to the location of your data in code on form load.

viz.

Option Explicit
Dim db as Database
.
.
.
Private Sub Form_Load()
Set db = OpenDatabase(App.Path & "\MyData.mdb")

Substitute the actual path to your database. For example, if your data is in a subdirectory of your application folder, use something like

Set db = OpenDatabase(App.Path & "\MyDataFolder\MyData.mdb")

Look for any other instances of properties pointing to external assets. Also, do a find on "\" in the code window to see if there is any place in the code itself which references a hard-coded path. If so, change it so that either the path is relative or so that the program can find the asset no matter what machine the program is installed on (by using a mechanism such as App.Path--which always points to your app's install folder--as described above).

Hope this helps.

Cheers,
Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top