I'm trying to select some data from a Progress Database using an openquery on SQL Server 2008 R2, but I'm getting this error message.
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".
I did some tests and I discovered that the problem is with a specif column which is a varchar column. The column has around 30 columns and for them the select works fine. This is my query:
SELECT * from openquery(progress, 'select DescricaoProduto from MP.pub.IMPproduto')
I tried to do some different selects but none of them worked. For example:
SELECT * from openquery(progress, 'select Cast(DescricaoProduto as char(100)) as DescricaoProduto from MP.pub.IMPproduto')
Any idea about what to do?
Progress data is all variable length. Progress applications routinely "over-stuff" fields. SQL tools often object to that. The Progress db maintains a SQL-WIDTH attribute which can be updated using the "dbtool" utility provided by Progress. If you are going to pull data from a Progress database you must use this tool periodically.
The easy path is to start PROENV (found in the OpenEdge program group) then run "dbtool dbname" and select option 2.
Or you can use the following SQL:
ALTER TABLE ALTER COLUMN SET PRO_SQL_WIDTH ;
if you know which table & column is causing the problem and you do not need to scan everything.