Rows showing as #DELETED

后端 未结 10 956
春和景丽
春和景丽 2020-12-16 03:48

I have rows of data in a table showing as #DELETED on one computer when using Access but they are fine in both the SQL database and on other computers using

相关标签:
10条回答
  • 2020-12-16 03:50

    Consider the use of numeric (18,0) instead of bigint for the primary key data type in SQL. MS Access can resolve the effectively big integer PK if it is set as a numeric data type on the SQL Server side. I ran into this same issue on SQL 2008R2 with Access 2010 where all the rows displayed '#DELETED' when using a bigint PK.

    0 讨论(0)
  • 2020-12-16 03:51

    Well just want to add solution which worked for me.

    I linked some of the Views to the MS Access and those were working fine. After some time i changed type of one of the column which was Integer before and i made that VARCHAR. As this column was a Primary Key of my table (which i selected too as primary key while adding View in MS Access), it started showing "#DELETED" after that change. To resolve this issue i just re-executed same View with "ALTER VIEW" statement and used sp_refreshview 'VIEW_NAME'.

    After doing this it started working for me. Hope this helps someone facing the same issue.

    0 讨论(0)
  • 2020-12-16 03:56

    I had the same #DELETED problem, and it was because the primary key data type was bigint . As I was querying a table created by a third-party application I was not able to modify the data type, so I created a view on the table and used CAST to convert the data type to int (after checking that the values held in the table would not cause an overflow).

    0 讨论(0)
  • 2020-12-16 03:57

    I've been connecting Access front ends to SQL Server 2000, 2008 R2 then 2014 for years without issue. After a hard disk failure, I reinstalled SQL Server 2014 Developer on a Windows 7 (64-bit) computer and suddenly my Access 2010 forms were getting the dreaded #Deleted in every field when moving to a new record or clicking Save on the ribbon.

    This was weird because an identical Windows 7 (64-bit) installation on another computer had no problems. Well, almost identical. After installing SQL Server 2014 on the new hard disk, I found only the Native Client 11.0 driver was installed, and so I modified ODBC connection strings to use DRIVER=SQL Server Native Client 11.0 in my Access VBA code. I immediately started getting the #Deleted in every field of an inserted record when using an Access form.

    Investigation showed the difference between the 'good' computer that handled inserted records properly, and the 'bad' computer that got #Deleted was the presence/absence of a Native Client 10.0 driver. I downloaded the 10.0 driver from Microsoft, installed it and checked my code to insure all the ODBC connection strings used DRIVER=SQL Server Native Client 10.0.

    Everything works OK now with no more #Deleted problems.

    0 讨论(0)
  • 2020-12-16 03:58

    There is an option to support the BigInt data type on newer versions of Access.

    File > Options > Current Database > Data Type Support Options
    

    Apply that option and then refresh your table.

    0 讨论(0)
  • 2020-12-16 04:04

    This strange behavior can occur pointing Access to a SQL 2017 database (previously pointed to a SQL 2008R2 database). When we created a new DSN with an updated ODBC Driver (SQL Native Client 11), the behavior returned to normal.

    0 讨论(0)
提交回复
热议问题