How to solve #Delete records when linking BIGINT MS SQL Primary Key in MS Access?

In MS Access, you will definitely encounter a #Deleted record tags in your MS SQL linked table when the table contains BigInt primary key as shown in the image below:


To solve the problem, you need to create a view and cast the BigInt primary key to a VarChar then link the view and not the table as shown in the image below.


Now link the view:


Thats it!

If you find this blog helpful, you can make the donation by clicking the Paypal button below.


3 thoughts on “How to solve #Delete records when linking BIGINT MS SQL Primary Key in MS Access?

  1. The above works but if you then use the view as one of several tables in an Access query it will not let you update or change any information in the “non view” tables. So the whole query becomes view only.
    My problem was the external SQL table is from some third party software that has used the bigint as the primary key, I appear to have got around this by creating an additional field in the table (the software allows user defined fields) and this field is a copy of the primary key field but in Varchar, removing the primary key indexing, then linking Access to the table where there is no primary key so that Access asks you to define which field is unique and I specify the new field and then once it is linked in Access reinstating the Primary Key on the original field. While the ODBC driver thinks it knows which is the primary key it works however do not relink or refresh the link as you have to do it all again.

  2. Gracias Harold Glenn , este fue el unico post que encontre relacionado al tema de access. en mi caso tuve q cambiar los valores de la tablas de bigint a int, pues todavia estaba en la etapa de pruebas đŸ™‚ . gracias

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s