首先在“企业管理器——安全性——链接服务器”与远程数据库服务器链接成功,数据库及表名完成一致,并且表结构完全一致,全是VARCHAR类型。
例如:
--delete执行成功
delete [tempServer].[tempDataBase].[dbo].[tempTable]
--insert执行失败
insert into [tempServer].[tempDataBase].[dbo].[tempTable]
select *
from [tempTable]
--错误信息如下:
服务器: 消息 7343,级别 16,状态 2,行 1
OLE DB provider 'SQLOLEDB' could not INSERT INTO table '[tempServer].[tempDataBase].[dbo].[tempTable]'. Unknown provider error.
[OLE/DB provider returned message: 游标操作冲突]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB' IRowsetChange::InsertRow returned 0x80040e23: Unknown provider error.].
请问如何解决,先谢了!
例如:
--delete执行成功
delete [tempServer].[tempDataBase].[dbo].[tempTable]
--insert执行失败
insert into [tempServer].[tempDataBase].[dbo].[tempTable]
select *
from [tempTable]
--错误信息如下:
服务器: 消息 7343,级别 16,状态 2,行 1
OLE DB provider 'SQLOLEDB' could not INSERT INTO table '[tempServer].[tempDataBase].[dbo].[tempTable]'. Unknown provider error.
[OLE/DB provider returned message: 游标操作冲突]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB' IRowsetChange::InsertRow returned 0x80040e23: Unknown provider error.].
请问如何解决,先谢了!
drop table [tempServer].[tempDataBase].[dbo].[tempTable] select * into [tempServer].[tempDataBase].[dbo].[tempTable]
from [tempTable]
服务器: 消息 117,级别 15,状态 1,行 2
The object name 'tempServer.tempDataBase.dbo.' contains more than the maximum number of prefixes. The maximum is 2.
drop table tempServer.tempDataBase..tempTable
select * into tempServer.tempDataBase..tempTable from tempTable
或者
delete tempServer.tempDataBase..tempTable
insert into tempServer.tempDataBase..tempTable
select * from tempTable
服务器: 消息 117,级别 15,状态 1,行 2
The object name 'tempServer.tempDataBase.dbo.' contains more than the maximum number of prefixes. The maximum is 2.
-----------------------------------------包含的前缀数目超过了最大值。最大值为 2
(最大值怎么会是2 ? 应该是 3 才对呀)
http://www.jiafangyifang.com/news/newsdata/2002_03_05/4/20020305140154.htm
http://topic.csdn.net/t/20040315/09/2843067.html
http://topic.csdn.net/t/20050723/08/4162777.html
把*去掉
显示指定字段呢
---------------------------------------------------------------
还是不行