First Published 15 Feb 2024                Last Updated 13 Mar 2024

TLDR:
The bug affects version 2312 and was reported on Mon 29 Jan. It was quickly fixed in the current channel and is also now fixed in the Monthly Enterprise Channel.
To receive the fix, current channel users just need to close and restart Access.
Monthly enterprise channel users - see below for more details of both the issue and the fix.


It is only a few weeks since I reported a similar error 3611 with refreshing links in code and that was very quickly fixed.
See FIXED: Error 3611 when refreshing links using code

Another similar error has arisen with current channel version 2312 Build 16.0.17126.20132 where refreshing links to SQL Server tables using code triggered error 3283 - primary key already exists.

Error 3283
When refreshing links in code, error 3283 occurred on the line tdf.RefreshLink in the code snippet below:

If tdf.SourceTableName = "tblLocalVariables" Then
      'If the table has a connect string, it's a linked table.
      If Len(tdf.Connect) > 0 Then
            tdf.Connect = ";DATABASE=" & CurrentProject.path & "\SDA.accdb"

            err = 0
            On Error Resume Next

            tdf.RefreshLink       ' Relink the table.

            If err <> 0 Then
                  ReconnectTableLinks = False
                  GoTo ErrHandler
            End If

      End If
End If



The error was first reported by former MVP, Dirk Goldgar, on 29 Jan.
It was fixed by the Access team for current channel users the following day without requiring a version update.
Once again, it appears to have been caused as an unintended side effect of fixing a different issue when refreshing table links.

To receive the fix, current channel users just need to close and restart Access.

I didn't write an article at the time as the bug appeared to have been fixed quickly.

However, despite this apparently fast response, over two weeks later, several users are still reporting issues in this thread at Microsoft Q&A forum:
When I run RefreshLink, I get an error saying "Primary key already exists"

Despite the error, some users reported that the links succeeded if error handling was used to allow the code to continue.
Also that refreshing links using the Linked Table Manager worked successfully.



UPDATE 28 Feb 2024

Following further reports of issues for users running the Monthly Enterprise Channel Version 2312 Build 16.0.17126.20190, I again asked the Access team for a status update. It was confirmed that the fix was supplied to the Current Channel on 30 Jan without needing a version update.

However, that fix wasn't applied to the Monthly Enterprise Channel (MEC).
The Access team have confirmed this will be fixed in the next MEC update to Version 2401 on 12th March.

Until that happens, there are several possible workarounds for MEC users:
1.   Use error handling to suppress error 3283. This will allow the links to refresh successfully with no messages.
2.   Roll back to MEC version 2311 (build 17029.20178) until version 2401 is released.
3.   Alternatively if it is feasible for your organisation, consider changing (at least temporarily) to the Current Channel (which has been fixed) or to the slower Semi-Annual
      Enterprise Channel (which hasn't yet been affected by the bug)

See also the article by Karl Donaubauer written for the Access Forever blog site: RefreshLink fails with "Primary Key already exists"



UPDATE 13 Mar 2024

The bug is now also fixed for the Monthly Enterprise Channel with the release of version 2401 build 17231.20290 on Tues 12 March.
Users should receive this update automatically. Alternatively, click Update Now from the Backstage (File Menu) ....Account page



Feedback

Please use the contact form below to let me know whether you found this article interesting/useful or if you have any questions/comments.

Please also consider making a donation towards the costs of maintaining this website. Thank you



Colin Riddington           Mendip Data Systems                Last Updated 13 Mar 2024



Return to Access Blog Page




Return to Top