i have an application that was created using Access 2007, its working perfectly with DSN, i update the application to use DSN-less connection to SQL-Server, i didn't change any code in the application, but when i run the application i am getting this error
Run-time error '3326' This Recordset is not updateable
Sub DnsLessLinkTable()
    Dim td As TableDef
    Dim stConnect As String
    Dim strTablesName(0 To 7) As String
    strTablesName(0) = "dbo_Directorate"
    strTablesName(1) = "dbo_Nationality"
    strTablesName(2) = "dbo_personal"
    strTablesName(3) = "dbo_Qualification"
    strTablesName(4) = "dbo_Qualimain"
    strTablesName(5) = "dbo_Qualisec"
    strTablesName(6) = "dbo_Section"
    strTablesName(7) = "dbo_Trips"
    For Each td In CurrentDb.TableDefs
       For Each TableName In strTablesName
           If td.Name = TableName Then
              CurrentDb.TableDefs.Delete TableName
           End If
       Next
   Next
   stConnect = "ODBC;Driver={SQL Server};Server=ServerNametest;Database=DBName;Uid=user;Pwd=password;"
   For Each TableName In strTablesName
       Dim splitTarget As Variant
       splitTarget = Split(TableName, "_")
       Set td = CurrentDb.CreateTableDef(TableName, dbAttachSavePWD, splitTarget(1), stConnect)
       CurrentDb.TableDefs.Append td
       AttachDSNLessTable = True
   Next
   Err.Description
End Sub
the only table that dosnt have a primary key is [Personal] in SQL server and i linked it to [dbo_personal]
the DSN-less module was run successfully and updated all the linked table, i am really struggling with this application, note that before DSN-less connection i was using the same connection string on building the DSN
any suggestion that will help