June 15, 2011 at 3:32 am
When I want to update a field from a view "dbo.Regusers_VACREF" I receive following error:
OLE DB provider "SQLNCLI10" for linked server "SQLVACRE052-053" returned message "Row handle referred to a deleted row or a row marked for deletion.".
Msg 7346, Level 16, State 2, Line 1
Cannot get the data of the row from the OLE DB provider "SQLNCLI10" for linked server "SQLVACRE052-053".
The update query:
UPDATE dbo.Regusers_VACREF SET NAME = 'Sw3rts' WHERE ID=1117698
A directly update to the linked server doesn't give errors/problems:
UPDATE [SQLVACRE052-053].Interactive.vac.RegisteredUser SET NAME = 'Sw3rts' WHERE ID=1117698
The view is only a collection of data from tables on a db on another server...
More info:
- SQL Server 2008 R2 is the server where I query on
- SQL Server 2005 is the linked server ([SQLVACRE052-053])
- Query itself is generated by an application, who can only view his own tables... (so we cann't change the query)
I don't find any reason why the update doesn't work.
June 15, 2011 at 3:35 am
More info:
SELECT u.NAME FROM [SQLVACRE052-053].Interactive.vac.RegisteredUser u WHERE u.ID=1117698
SELECT NAME FROM dbo.Regusers_VACREF WHERE ID=1117698
Both query's are ok, no problems here (with a select), only with the update...
June 15, 2011 at 4:59 am
More info (in meanwhile I'm still googling around):
- All tables in the view have PK
- No triggers in the remote db
June 15, 2011 at 5:10 am
This was removed by the editor as SPAM
June 15, 2011 at 5:12 am
Not tried... I will do
But I cann't change the query itself, because it's programmed already in the application 🙁
June 15, 2011 at 5:15 am
stewartc-708166 (6/15/2011)
have you tried using OPENQUERY?
UPDATE OPENQUERY([SQLVACRE052-053],'SELECT u.NAME FROM Interactive.vac.RegisteredUser u WHERE u.ID=1117698')
SET NAME = 'xxxxxxx'
OPENQUERY worked without any problem.
June 15, 2011 at 5:35 am
This was removed by the editor as SPAM
June 15, 2011 at 5:47 am
Thanks for the info.
I will ask the application owner to check this problem... hope they can change there working principle.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply