我正在尝试使用 SQL Server 2008 R2 上的 openquery 从进度数据库中选择一些数据,但我收到了此错误消息。
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "MSDASQL" for linked server "progress" reported an error. The provider reported an unexpected catastrophic failure.
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "MSDASQL" for linked server "progress".
我做了一些测试,发现问题出在一个特定的列上,它是一个 varchar 列。该列有大约 30 列,对他们来说,选择工作正常。这是我的查询:
SELECT * from openquery(progress, 'select DescricaoProduto from MP.pub.IMPproduto')
我试图做一些不同的选择,但没有一个奏效。例如:
SELECT * from openquery(progress, 'select Cast(DescricaoProduto as char(100)) as DescricaoProduto from MP.pub.IMPproduto')
知道该怎么做吗?