获取ORA-00932:数据类型不一致:预期-在.net中使用数据库优先获取CLOB [英] Getting ORA-00932: inconsistent datatypes: expected - got CLOB with Database First in .net
问题描述
所以我首先在oracle数据库上使用EF数据库。在我的代码中执行此操作时,出现上述错误:
So I am using EF database first on an oracle db. I am getting the above error when I do this in my code:
contractType.CLIENT_TYPE != null && contractType.CLIENT_TYPE.ToUpper() == "POL"
该列定义为VARCHAR2(10 BYTE
That column is defined as VARCHAR2(10 BYTE) in Oracle and the .net type is string.
进行了大量搜索,没有人真正提到过.net上下文中的此错误。希望有人可能有一个主意。
Did a lot of searching and no one really mentions this error in the context of .net. Hoping someone might have an idea.
推荐答案
所以我想出了一个解决方案。我使用的是Odp.net版本11。显然,这是某些使用where扩展方法的linq语句的错误。我升级到odp.net 12版,它解决了该问题。
So I figured out a solution to this. I was using Odp.net version 11. Apparently this is a bug with certain linq statements using the where extension method. I upgraded to odp.net version 12 and it fixed the issue.
这篇关于获取ORA-00932:数据类型不一致:预期-在.net中使用数据库优先获取CLOB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!