1 1 1 1 1 1 1 1 1 1 Rating 3.00 (2 Votes)

Problemstellung:

Wie ermittle ich die auf meinem System installierte DAO-Versionen?
DAO 3.5   = A97
DAO 3.6   = A00-A03
DAO 12.0 = A07

Public Const sEngine As String = "DAO.DBEngine."

Public Function DAOExist() As String
'------------------------------------------------
' Procedure : DAOExist
' DateTime  : 29.01.2008 18:50
' Author    : TommyK
'------------------------------------------------
  Dim objTmp As Object
  Dim sResult As String
  Dim vDAOVersionList As Variant
  Dim vDAOTextList As Variant
  Dim i As Integer
  On Error Resume Next
    vDAOVersionList = Array("35", "36", "120")
    vDAOTextList = Array("DAO 3.5, ", "DAO 3.6, ", "DAO 12.0, ")
    For i = 0 To 2
        Set objTmp = CreateObject(sEngine & vDAOVersionList(i))
        If Err = 0 Then sResult = sResult & vDAOTextList(i)
        Err.Clear
    Next i
    If sResult = "" Then
        sResult = "Kein DAO installiert ..."
    Else
        sResult = Left(sResult, Len(sResult) - 2)
    End If
    Set objTmp = Nothing
    DAOExist = sResult
End Function

Aufruf:

MsgBox DAOExist

Das Ergebnis:

 

Ähnliche Artikel

Kommentar schreiben

Sicherheitscode
Aktualisieren

Login Form

1.png1.png9.png3.png1.png8.png2.png
Heute55
Gestern56
Diese Woche111
Dieser Monat1241
Total1193182

  • IP: 54.81.78.135
  • Browser: Unknown
  • Version:
  • OS: Unknown

Online

1
Online

22. Mai 2018