954,116 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

VB6 Run-time error '53': FIle not not found

Hi! I have a VB6 project and I used ms access as my database(Database.mdb), I packed my project including the database, I already install it on my PC, but when I use or run my newly installed VB6 project and type the username and password I got this error: Run-time error '53': File not found. Can somebody explain why I got this error? Please I need help. Thanks. :)

Sorb3t3ro
Newbie Poster
14 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

Where did you tell your setup package to install your database? Because I believe the path you used to point to your database is incorrect and hence the error you are recieveing...

Good Luck

vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
 

I put it on C:\Program Files\Microsoft Visual Studio\VB98\CSCI15\Package\Support. I aslo include the Setup.ini file setting the path to C:\Program Files\Microsoft Visual Studio\VB98\CSCI15\Package\Support. But still have have the same error. This is my first time to pack a VB6 project with a database. I think there's something wrong with the packaging process. Any help?

Sorb3t3ro
Newbie Poster
14 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

Are you using the PDW? (Package and Deployment Wizard) If so, when you are walking through the steps, there is a screen that allows you to add files (Files are not added automatically when you put them in the support directory, you have to add them.). Use this screen to add the database and to specify where it is to be installed.

Good Luck

vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
 

What kind of connection are you using? DAO or ADO ?

How do you access the database...???
In ADO, an exapmle is:

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset

Set cn = New ADODB.Connection
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
      "Data Source= " & App.Path & "\database.mdb;Persist Security Info=False;Jet OLEDB:Database Password=ElE;"
    cn.Open

Look at the 6 line of code...
If the database is residing in the same folder(ie. application folder), then, for example if you have installed in "C:\mysoft" folder,thenApp.path & "\database.mdb" gives C:\mysoft\database.mdb

akhileshbc
Newbie Poster
14 posts since Nov 2009
Reputation Points: 10
Solved Threads: 5
 

ok. what location you give in your project. is it same as what your said?

abu taher
Practically a Posting Shark
845 posts since Jul 2008
Reputation Points: 14
Solved Threads: 78
 

I put the support folder inside the package folder here is the complete path: C:\Program Files\Microsoft Visual Studio\VB98\CSCI15\Package\Support. And the database is inside the support folder.

Sorb3t3ro
Newbie Poster
14 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

It seems that your connection is looking for the database in the same place as to when you were developing your app. Go make sure that it is still in the same folder on the SAME pc you developed on as to where you have installed onto. In other words, if you installed onto a different pc, the app is looking for a database in a folder the same as to where you saved it on your own pc.
If the installed pc and the development pc is the same, your app. is looking for another file not saved in the correct folder. Check all your files that was added to the setup to your actual developed app.

Hope this help.

AndreRet
Senior Poster
3,918 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
 

To begin with, let me reiterate that just because you put a file in the support folder does not mean it will be included with your setup package! You have to manually add the file when creating your setup package and when you do so you have to specify exactly where you want it to be installed! Then if you have hard coded your path to where this file is located in your code and the file is not installed in that exact same place...

Good Luck

vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You