Connection.Open invalid operation exception using Jet OLEDB and Paradox in .net project

I have a large collection of small databases that open in Access. I am trying to open them in a vb.net application (.net framework 4.7.2) with this connection string (and variations for the many directories that contain the other database files): "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=R:\ConversionInputs\CONVBIN-210--XDR-Televere\XDRData\Patients\10001;Extended properties=Paradox 7.x;". This used to work, but recently I began getting an invalid operation exception from the Microsoft JET Database Engine. The state of the connection is closed. There are no "<" or ">" characters in the actual connection string. I always end up in the catch block with the exception. Here is my complete code:

Public Class Form1

Private ReadOnly mstrConnectString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended properties=Paradox 7.x;"

Private Sub ButtonExport_Click(sender As Object, e As EventArgs) Handles ButtonExport.Click
    Dim patients = IO.Directory.GetFiles(Me.tbImages.Text, "*.db", IO.SearchOption.AllDirectories)
    lblResult.Text = $"Found {patients.Length} patient directories in {Me.tbImages.Text}."
    For Each patient As String In patients
        If Not patient.ToLower.Contains("patient") Then Continue For
        If patient.Contains("PatientList") Then Continue For
        Using oledbCon As New System.Data.OleDb.OleDbConnection(String.Format(mstrConnectString, IO.Path.GetDirectoryName(patient)))
            Try
                oledbCon.Open()
                If oledbCon.State = ConnectionState.Open Then
                    lblResult.Text = $"Opened {patient}."
                Else
                    lblResult.Text = $"Failed to open {patient}. State is {oledbCon.State}."
                End If
            Catch ex As Exception
                lblResult.Text = $"Exception in attempt to open {patient}. State is {oledbCon.State}. Exception is {ex.Message}"

            End Try
        End Using
    Next
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    If Me.FolderBrowserDialog1.ShowDialog() = DialogResult.OK Then Me.tbImages.Text = Me.FolderBrowserDialog1.SelectedPath
End Sub

End Class

1 answer

I just had to step back from .net framework 4.7.x to 3.5. Apparently, the more recent .net framework versions don't support paradox .db files well.