I am having an issue when trying to do an update via a linked server. Error is the following:
OLE DB provider "MSDASQL" for linked server "**LINKED_SERVER_NAME" returned message "Data provider or other service returned an E_FAIL status.".
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "MSDASQL" for linked server "LINKED_SERVER_NAME".
I have no problem selecting data but any time I try to do an update it fails. My update code:
Update [LINKED_SERVER_NAME]...[Table_Name]
SET post_content = 'alert'
where ID = 5061
This is my select statement which DOES work:
select top 100 * from [LINKED_SERVER_NAME]...[Table_Name] where ID = 5061
I am using:
- Microsoft SQL Server Management Studio 2008
- Trying to connect from MS SQL -> MySQL via ODBC Connector 5.2 (5.1 has same issue)
UPDATE I have tried to use "OPENQUERY" -> this does not work either
UPDATE OPENQUERY(LINKED_SERVER_NAME, 'SELECT post_content FROM Table_Name WHERE ID = 4061') SET post_content = 'alert'- see msdn.microsoft.com/en-us/library/ms188427.aspx