.NET与Oracle(ODP.Net)

编程入门 行业动态 更新时间:2024-10-27 04:28:19
.NET与Oracle(ODP.Net) - 没有数据(.NET with Oracle (ODP.Net) - no data)

我们的团队中有4个开发人员,我们中的2个人可以从我们的.NET 3.5 asp.net webapp查询Oracle数据。 但是在同一个查询中,其他2个没有得到任何结果。 在他们的情况下,如果他们用硬编码值替换参数,他们会得到结果。 例如:

select * from sometable where userid =:userid

(这适用于我们两个人,但不适用于其他2人)

select * from sometable where userid ='12345'

(这适用于所有人)

我们都在执行相同的确切代码,完全相同的查询。 知道为什么参数化查询没有为我们中的某些人返回任何内容吗?

We have 4 developers in my group and 2 of us can query Oracle data no problem from our .NET 3.5 asp.net webapp. But the other 2 get no results back, in the same exact query. In their case, if they replace the param with a hardcoded value, they get results back. For example:

select * from sometable where userid = :userid

(this works for 2 of us, but not the other 2)

select * from sometable where userid = '12345'

(this works for everyone)

We are all executing the same exact code, same exact query. Any idea why the parameterized query returns nothing for some of us?

最满意答案

我向你保证,它与代码无关。 在两台无法运行的计算机上,您可能有错误的数据访问组件。 或者,.NET糟透对完全错误的对象的引用,这些对象不会破坏编译时间,但它们不支持绑定变量。 如果可以,请检查哪些库已加载到您的域对象中,很明显您正在加载完全错误的库。

I guarantee you that it has nothing to do with code. On two machines where it doesn't work you either have wrong data access components. Or, .NET sucks in references to completely wrong objects, which don't break the compilation time but they don't support bind variables. If you can, check which libraries are loaded into your domain object, it would be clear that you're loading completely wrong libraries.

更多推荐

query,查询,exact,results,参数,电脑培训,计算机培训,IT培训"/> <meta name="des

本文发布于:2023-08-07 20:37:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1465643.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Oracle   NET   Net   ODP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!