Lucas
asked on
operation must be an updateable query
I have created a view on SQL server that is linked to my ms access db. I can open the linked view as a table and make edits on it without any issues.
I can run an update query and the data will be updated on SQL server. However, when i put my app on another user's computer and they do the same steps, the update fails. It gives me the "operation must be an updateable query".
What gives? Here is my query. It works on my box.
I can run an update query and the data will be updated on SQL server. However, when i put my app on another user's computer and they do the same steps, the update fails. It gives me the "operation must be an updateable query".
What gives? Here is my query. It works on my box.
CurrentDb.Execute "update dbo_vwLoadDelivery set delivered = -1 " & _
", deliverydt= '" & rs!LoadDeliveryDt & "'" & _
", editedby = '" & Environ("username") & "'" & _
", datelastedited = '" & Now() & "'" & _
" where orderid = '" & rs!OrderId & "'"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This is ms access 2007. The linked table points to a view on sql server. I can manually edit the data and i can run update query on the data. I put my ms access app on another computer and the person cannot run the query, but they can manually update the data.
Maybe i should try a pass-thru query?
Maybe i should try a pass-thru query?
"I have created a view on SQL server that is linked to my ms access db." - I read that such that the table is a Access one. Obviously not.
Is orderid a (unique) key? Are you certain both users see the same view and tables on MSSQL?
Is orderid a (unique) key? Are you certain both users see the same view and tables on MSSQL?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@Olemo, when i link the view to ms access it asks me what field is the PK. Orderid is the PK.
@Mx, yes i can open the view in access on the problem machine and edit the data.
@Jim, i link it and pick orderid as the PK. There is only one login for the sql server and that user has correct permissions on the tables / views.
@Mx, yes i can open the view in access on the problem machine and edit the data.
@Jim, i link it and pick orderid as the PK. There is only one login for the sql server and that user has correct permissions on the tables / views.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
my view is based only on 1 table
SELECT OrderID, [Delivery Date] AS DeliveryDt, Delivered, EditedBy, DateLastEdited
FROM dbo.Orders
SELECT OrderID, [Delivery Date] AS DeliveryDt, Delivered, EditedBy, DateLastEdited
FROM dbo.Orders
ASKER
It was my fault. The view wasn't linked properly on the user's machine. I corrected it and now it works fine.
Thanks guys.
Thanks guys.
mx