Sunday, February 19, 2012

error message in view to a linked server

arno,
Here is someone about a year ago getting a very similar error:
https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1245831&SiteID=1
It seems that datatype mapping is at the root of the problem, so perhaps
this article (and its references) will help.
http://msdn2.microsoft.com/en-us/library/ms175970.aspx
But I have never seen this error myself.
RLF
"arno" <nospam@.invalid> wrote in message
news:ey2LLfeUIHA.1208@.TK2MSFTNGP05.phx.gbl...
> Hello,
> I have a firebird 1.5 application. In my sql-server 2000 I created a
> linked server to firebird using the firebird odbc driver. I cannot query
> one table because I get the following error:
> " [Non-interface error: Column 'ERHALTENABSCHLAG' (compile-time ordinal
> 35) of object 'LVVERW' was reported to have a DBTYPE of 5 at compile time
> and 131 at run time]. (Source: Microsoft OLE DB Provider for SQL Server)
> (SQL State: 01000) (NativeError: 7300)Error -2147217900 "
> How can I solve tis problem?
> I cannot find any corrupt data in that column. I can query the table w/o
> problems from an Access Database with odbc-links to the table. I can
> Import the table into an sql-server database using the odbc-driver w/o a
> problem, it is just impossible to run a query on the table of the linked
> server.
> regards
> arno
>
arno,
I don't want to post the whole thread, but these are some of the comments.
#1 - IgorB
I found that the problem is usually in the data type of the columns defined
in the Oracle view: for example SQL 2005 doesn't like a oracle INTEGER, but
if you convert the integer columns in a NUMBER the error will disappear. The
same with the Oracle VARCHAR2.
#2 - Hans G
It occured with Oracle >= 9.2.6 (w. Sql2000 and Sql2005).It only occurs on
Querys in the format of "select * from ORASRV..USER.TABLE"; and thereby
only; if the oracle-table has fields of type "number". When I alter the
oracle-number-fields to a more precise type of e.g. number(10), the problem
is solved.
#3 - Kev dock
It appears, from reading forums, that a field defined as "TEST NUMBER" is
typeless whereas a field defined as TEST NUMBER(10,2) is not - hence ODBC or
OLEDB drivers get confused as they dont know what to convert these things
to.
RLF
"arno" <nospam@.invalid> wrote in message
news:uiVC3iCVIHA.5208@.TK2MSFTNGP04.phx.gbl...
> Hello Russel,
>
> I cannot follow the link, and cannot google the postID. Can cut/paste the
> thread?
>
> I think it does not say what to do in a case of error.
> arno
>

No comments:

Post a Comment