简体   繁体   English

OleDbDataReader与SQL Developer给出的结果不同

[英]OleDbDataReader not giving same results as SQL Developer

The following query on my oracle db gives results that look fine when run in SQL Developer. 在我的oracle数据库上的以下查询给出的结果在SQL Developer中运行时看起来不错。

select * 
from guideline$ a left outer join textfragment$ t 
    on (a.TEXTFRAGMENT_CODE = t.TEXTFRAGMENT$_CODE) 
start with a.knowledge$_Code = 71122 and a.guideline$_pcode is null
connect by prior a.guideline$_Code = a.guideline$_pcode 
order SIBLINGS by a.tag_order

All rows are populated correctly. 正确填充了所有行。 When the same exact query is ran in my program using OleDbReader.ExecuteReader() some of the rows contain a null value for a specific column when they didn't in my SQL Developer results. 当使用OleDbReader.ExecuteReader()在我的程序中运行相同的确切查询时,当某些行不在SQL Developer结果中时,其中某些行将包含特定列的空值。 The data type of that column is CLOB. 该列的数据类型为CLOB。 I can not see any pattern as to why some of the rows have a null value and some do not. 对于某些行为何具有null值而有些行没有null的原因,我看不到任何模式。

Not sure what other information would be helpful... 不确定还有哪些其他信息会有所帮助...

Does anyone have any ideas on what might be going on? 是否有人对可能发生的事情有任何想法?

Your problem may be related to the way that binary data is retrieved with OleDbDataReader . 您的问题可能与使用OleDbDataReader检索二进制数据的方式有关。

You should use GetBytes() , and follow this article . 您应该使用GetBytes() ,并遵循本文

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM