Distributed queries that use the OpenQuery function to update, delete, or insert data in the following way may generate the following error messages:
If you are using Microsoft SQL Server 2005, you receive the following error message:
exec sp_dropserver 'linked1', 'droplogins'
exec sp_addlinkedserver 'linked1', 'SQL Server'
exec sp_setnetname 'linked1', '<servername>'
exec sp_addlinkedsrvlogin 'linked1', 'false', null, '<login name>', '<password>'
SET ANSI_NULLS ON
go
SET ANSI_WARNINGS ON
go
select * from openquery (linked1, 'update testlinked set ssn=ssn+1')
select * from openquery (linked1, 'insert into testlinked (ssn) values (1000)')
select * from openquery (linked1, 'delete from testlinked where ssn=1')
Server: Msg 7357, Level 16, State 2, Line 1 Could not process object 'update testlinked set ssn=ssn'. The OLE DB provider 'SQLOLEDB' indicates that the object has no columns.
Server: Msg 7357, Level 16, State 2, Line 1 [Microsoft][ODBC SQL Server Driver][SQL Server]Could not process object 'update testlinked set ssn=ssn'. The OLE DB provider 'MSDASQL' indicates that the object has no columns.
The actual text message of the error may vary depending on the OLE DB provider and the operation (UPDATE, INSERT, or DELETE) being performed, but the error number is always 7357. Server: Msg 7357, Level 16, State 2, Line 1 [Microsoft][ODBC SQL Server Driver][SQL Server]Could not process object 'update testlinked set ssn=ssn'. The OLE DB provider 'MSDASQL' indicates that the object has no columns.
If you are using Microsoft SQL Server 2005, you receive the following error message:
Server: Msg 7357, Level 16, State 2, Line 1 Cannot process the object "update testlinked set ssn=ssn". The OLE DB provider "SQLOLEDB" for linked server "ServerName" indicates that either the object has no columns or the current user does not have permissions on that object.