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

Programmatically check for version of ADO ext 2.7 or 2.8

Status
Not open for further replies.

tburrows

Technical User
Oct 3, 2003
49
0
0
US
I'm running access 2002 which has ADO Ext 2.8 for DDL & Security. Most of the machines which run the applications I do are running access 2000 with ADO Ext 2.7. What I'm doing now is that when I load a new application I get an error message and I have to go in and uncheck the missing 2.8 and check to use 2.7.

What I'm looking for is a programmatically way to do this.

Thanks
 
Code:
Function FixADOVersion() As Boolean
On Error GoTo ErrHandler
  If Dir(References("ADODB").FullPath) <> "" Then
    FixADOVersion = True
  Else
    References.Remove References("ADODB")
    References.AddFromGuid "{EF53050B-882E-4776-B643-EDA472E8E3F2}", 2, 7
    FixADOVersion = True
  End If
ExitHere:
  Exit Function
ErrHandler:
  Resume ExitHere
End Function

VBSlammer
redinvader3walking.gif

"You just have to know which screws to turn." - Professor Bob
 
You did say DDL and Security:
Code:
Function FixADOXVersion() As Boolean
On Error GoTo ErrHandler
  If Dir(References("ADOX").FullPath) <> "" Then
    FixADOXVersion = True
  Else
    References.Remove References("ADOX")
    References.AddFromGuid "{00000600-0000-0010-8000-00AA006D2EA4}", 2, 7
    FixADOXVersion = True
  End If
ExitHere:
  Exit Function
ErrHandler:
  Resume ExitHere
End Function

VBSlammer
redinvader3walking.gif

"You just have to know which screws to turn." - Professor Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top