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

Should I/Can I install Earlier versions of ADO/Jet Libraries?

Status
Not open for further replies.

tgikristi

Technical User
Jul 31, 2002
39
US
I have a problem...(besides trying to program an Access DB when I am not a programmer and know nothing about programming): I have developed a database on my home computer, which has Access 2002 (I formatted the DB as an Access 2000 format), therefore, it referenced ADODB, ADOX, and ADOR version 2.7 libraries and JRO version 2.6 but all my users (who have Access 2000) are going to have 2.5 versions.

When I test-deployed the DB, Access could not figure out on its own to set the 2.5 versions on the user's computer, so it just came up with MISSING for the 2.6/2.7 versions I had set.

I have other libraries referenced that did not come up missing, e.g. ACCESS and MSACAL libraries were able to automatically switch from the 10.0 version I had set to the user's 9.0 version.

Is there any possibility that I can just download the earlier 2.5 versions for my computer and use those in my db and hopefully that will clear up the reference problem? (Is there anything wrong with this?) I have also read an FAQ from this site that linked to some ms code for fixing broken references, and I have incorporated it into my AutoExec code but don't have any users to test it out on at the moment--does anyone know if code like this would unselect the Missing references that my users have and then be able to select the other version of the same reference? (it was faq181-936)

Thanks for any thoughts,
tgikristi
 
tgikristi,
You can either reference the earlier libraries on your machine, or look into the AddReference function, which will automatically add the reference you specify. I can't remember the exact syntax (it's in the Help) or the specifics, but I think that there is a way with that function that the libraries can be referenced 'generically' where the system will pick the latest (or only) one.

--Jim
 
As I have found out from MSDN, I cannot install any earlier version of MDAC on my Windows XP computer. I have whittled my references down so the only conflict I seem to have is msadox.dll (ADO ext 2.7 for DDL and Security), because I have version 2.7 and my users have 2.5

I have searched in the Help files and as many other places I can think, and the only way to set a reference is with the AddFromFile and AddFromGUID, which as far as I can tell, both require non-generic paths or identifiers to/of the library. I have no idea how to set a generic reference to an ADO DDL/Security library of my users, which is what i would like to do.
 
I believe Microsoft uses the same DLL name for all the versions. Try this code.

Function ReferenceFromFile(strFileName As String) As Boolean
Dim ref As Reference

On Error GoTo Error_ReferenceFromFile
Set ref = References.AddFromFile(strFileName)
ReferenceFromFile = True

Exit_ReferenceFromFile:
Exit Function

Error_ReferenceFromFile:
MsgBox Err & ": " & Err.description
ReferenceFromFile = False
Resume Exit_ReferenceFromFile
End Function

Function CreateReference()
If ReferenceFromFile("C:\Program Files\Common Files\SYSTEM\ADO\msadox.dll") = True Then
MsgBox "Reference set successfully."
Else
MsgBox "Reference not set successfully."
End If
End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top