How to resolve a "Could not find installable ISAM error in MySQL connection string in Access module

308 views Asked by At

Access 365/Windows 10

I’m getting the “Could not find installable ISAM” error which I believe means I’ve a problem with my connection string below.

I did a right click, export on a single Access table to the MySQL backend so that I could link it and verify the driver, server, port, database, etc. of that connection against the connection string in the function below. It all looks good. Can you see what I've done wrong?

I have 128 tables to migrate to MySQL and am looking for a efficient, repeatable process; I had high hopes for this code...

'''

Public Function fncExportTables() As Boolean

  'Declare Variables...
    Dim strCnn As String
    Dim rs As Recordset
    Dim db As Database
    Dim strTp As String
    Dim strOriginal As String

  'The Connection String required to connect to MySQL. 
'I THINK THIS IS THE PROBLEM
   strCnn = "DRIVER={MySQL ODBC 8.0 Driver};" & _
                "SERVER=myServer;" & _
                "PORT=24299;" & _
                "DATABASE=myDb;" & _
                "USER=myUserName;" & _
                "PASSWORD=myPassword;" & _
                "OPTION=3;"
                                 
    strTp = "ODBC Database"

  'Trap any Errors...
  On Error GoTo Error_fncExportTables
 
  'Open a recordset from the table the conatains
  'all the table names we want to Link from the
  'MySQL Database.
  Set db = CurrentDb
  Set rs = db.OpenRecordset("qselMgr", dbOpenSnapshot)
  With rs
      'Fill the Recordset...
      .MoveLast
      .MoveFirst
      'Enumerate through the Records...
      Do Until rs.EOF
        'Place the Table Name into the str string variable.
        ' FieldName (below) would be the Field name in your Access
        ' Table which holds the name of the MySQL Tables to Link.
        strOriginal = !strOriginalName
        'Make sure we are not dealing will an empty string..
        If Len(strOriginal) > 0 Then
            'Link the MySQL Table to this Database. 
'ERROR TRIGGERS ON THE LINE BELOW
            DoCmd.TransferDatabase acExport, strTp, strCnn, _
                  acTable, strOriginal, strOriginal
        End If
        'move to the next record...
        .MoveNext
      Loop
  End With
  'We're done...
 
Exit_fncExportTables:
  'Clear Variables and close the db connection.
  Set rs = Nothing
  If Not db Is Nothing Then db.Close
  Set db = Nothing
  Exit Function
 
Error_fncExportTables:
  'If there was an error then display the Error Msg.
  MsgBox "Export Table Error:" & vbCr & vbCr & _
          Err.Number & "  -  " & Err.Description, _
          vbExclamation, "Export Table Error"
  Err.Clear
  Resume Exit_fncExportTables
End Function

'''

0

There are 0 answers