Access error 3443: unrecognized database format 'databasename.mdb'

What could be the cause of the above error when trying to use an MDB file from a VB application?

The access version of the MDB file is 6.68.

I have a feeling that this could be caused by someone trying to open a .mdb file from a newer version of Access and could damage the MDB.

How to solve this problem?

+3
source share
2 answers

Here are a few VBScript that hopefully get a version for you. Save this in a plain text file with the vbs extension and drag mdb onto it. This is a very quick sketch and only roughly checked.

Set fs = CreateObject("Scripting.FileSystemObject")

If WScript.Arguments.Count > 0 Then
    sPath = WScript.Arguments.Item(0)
Else
    sPathTemp = Left(WScript.ScriptFullname, _
        InStrRev(WScript.ScriptFullname, "\"))

    sPath = InputBox("Enter Path and Name of .mdb", "Get Ver", sPathTemp)
End If

If sPath = "" Or fs.FileExists(sPath) = False _
    Or Right(sPath, 4) <> ".mdb" Then

    MsgBox "Not a valid file: " & vbCrLf & sPath, 64, "Get Ver" 
Else

    Set cnnDB = CreateObject("ADODB.Connection")
    cnnDB.Provider = "Microsoft.Jet.OLEDB.4.0"
    cnnDB.Mode = 1 ''adModeRead

    On Error Resume Next
    cnnDB.Open sPath

    If Err.Number <> 0 Then
         MsgBox "Error"
    Else
        MsgBox "4 = Access 97, 5 = Access 2000 (2002?)" & vbcrlf & _
        "Value for " & sPath & " is: " & _
        cnnDB.Properties.Item("Jet OLEDB:Engine Type").Value
        cnnDB.Close
    End If
End If
0
source

" " , Access, Access (, , Jet).

Access Wiki , Version 6.68. , Jet, , , , Jet .

, Access 2007, accend mde, Access 2007 SP1, Access 2007 SP.

, , . , , .. , , , , .

0

Source: https://habr.com/ru/post/1744469/


All Articles