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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing dependency file

Status
Not open for further replies.

hansu

Programmer
Mar 12, 2002
89
I installed an application that I developped with VB6 on a user's machine. Everything is working fine except compacting the Access DB causes an error:
Database name or number is wrong.
To provide the possibility to compact an Access DB I used JRO. The reference to JRO 2.5 library is added in the project. When I created the package with the P&D Wizard I was notified of missing dependency information for JRO 2.5.
I ignored it because I thought the necessary information would be on the user machine (Windows 2000).
So guess that's what causes the problem.
Can I add the missing information to the user machine without making a completely new package?

Thanks for your assistance.
 
um, the error that you posted was "Database name or number is wrong".

If it was a missing JRO dependency file, the another error message should have come prior to that - when the program started or the Object gets first used.

If it gets that far, then I would check for another source for the error. [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Thank you CCLINT
May be you have an idea when I send the code. It works well on the development machine. Could it be a matter of MDAC 2.5 which is on the user machine?
Code:
Private Sub mnuCompactDB_Click()
On Error GoTo Err_Handler

If DataEnvironment1.conAdmindb.State Then DataEnvironment1.conAdmindb.Close
mnuCompactDB.Enabled = False
Dim jroEngine As JRO.JetEngine, strSourceDB$, strDestDB$
Set jroEngine = New JRO.JetEngine
MousePointer = vbHourglass
strSourceDB = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\admindb.mdb;"
strDestDB = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\temp.mdb;"

If Dir(strDestDB) <> &quot;&quot; Then Kill (strDestDB)
jroEngine.CompactDatabase strSourceDB, strDestDB & &quot;;Jet OLEDB:Engine Type=4&quot;
As &quot;D:\Development\SmallBusinessApp\admindb.mdb&quot;
Kill (App.Path & &quot;\admindb.mdb&quot;)
Name App.Path & &quot;\temp.mdb&quot; As App.Path & &quot;\admindb.mdb&quot;
MsgBox &quot;Die Datenbank wurde erfolgreich komprimiert!&quot;, vbOKOnly + vbInformation, &quot;Datenbank komprimieren&quot;
Err_Handler:
If Err.Number <> 0 Then MsgBox Err.Description
MousePointer = vbDefault
mnuCompactDB.Enabled = True

End Sub
 
Sorry, forgot to delete the following line, which is not longer part of the code:
Code:
As &quot;D:\Development\SmallBusinessApp\admindb.mdb&quot;

 
May be I was not clear enough. The codeline above is not the reason for the error. I just forgot to delete it when I pasted the code. It is part of code which is commented out and just used for developing.

 
JRO is also installed with MDAC 2.5.

Try to find out which line of code is causing the error (in the exe, use a msgbox or lable before or after each line).

Also, which MDB version are you using? ('97 = Engine Type 4; 2000 = Engine Type 5)

See if the client has the MSJRO.Dll and what version it is. [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Also, what is the exact error decription and number? [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Thanks for your tips CCLINT
I'm going to check those points. The only thing clear at this moment is that Engine Type is 4.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top