Reputation: 1645
I have access database called road.mdb.
Inside road.mdb, I have a linked SQL table and
the table name is student.
I can insert records using query design in MSAccess
But I cannot update nor Delete
when run delete query below, the error is: could not delete from specified table
delete from student where studentid=303;
and when I run update query below, the error is: Operation must use an updateable query
update student set Name='BOB' where studentid= 303;
I have full access to the sql database and I can run the query OK using sql management studio. Is it impossible to delete and update using query design inside MSaccess?? The weird thing is I can insert new records using query design inside MSaccess
thank you
Upvotes: 7
Views: 37827
Reputation: 1
In my case the problem was a BIT column. I think the problem occurs when the the bit column contains a NULL value.
To resolve the issue, I either deleted the entire column, or set a default value.
Upvotes: 0
Reputation: 151
In my case, the linked table only had keys. I had to modify one of the keys to be a primary key and then I could truncate truncate the table via a DELETE table.* FROM table via access.
Upvotes: 0
Reputation: 11
You will find that the following steps will most likely solve your problem:
(You can easily check if 'things are OK' afterwards by adding a record to the SQL Server table and accessing it through the MS Access linked table. When all is OK you should not see #Deleted when viewing the data from MS Access side.) Hope it helps ;-)
Upvotes: 1
Reputation: 1001
In the case that you can't manipulated the table on SqlServer, you can get around the problem by telling Access which/s column/s are meant to be the primary key. This is done on the last step of creating a Linked table, the window title is "Select Unique Record Identifier".
Upvotes: 1
Reputation: 1645
I SOLVED this by adding primary key to the SQL table and re linked the table to ACCESS
Thanks everyone...
Upvotes: 10