日期:2014-05-18  浏览次数:20407 次

[求救]opendatasoure问题
在查询分析器中用如下语句测试:
insert   into   OdbcTest(LastValue)   select   result   from   OPENDATASOURCE( 'SQLOLEDB ', 'Data   Source=172.16.8.32;User   ID=sa;Password=zxgs ').Target.dbo.History  

其中:
Target     数据库
OdbcTest,History   表
result,LastValue   字段,类型都是float  

报错如下:
链接服务器 "(null) "的   OLE   DB   访问接口   "SQLNCLI "   返回了消息   "An   error   has   occurred   while   establishing   a   connection   to   the   server.   When   connecting   to   SQL   Server   2005,   this   failure   may   be   caused   by   the   fact   that   under   the   default   settings   SQL   Server   does   not   allow   remote   connections. "。
链接服务器 "(null) "的   OLE   DB   访问接口   "SQLNCLI "   返回了消息   "Client   unable   to   establish   connection "。
消息   21,级别   16,状态   1,第   0   行
Encryption   not   supported   on   the   client.

请问高手是什么问题啊,应该如何解决哈???

------解决方案--------------------
如果是SQL2005
选项—查询执行—SQL server—(高级、ANSI)的设置

------解决方案--------------------
执行一下这两个设置试试
SET ANSI_NULLS ON
go
SET ANSI_warnings on