OleDbDataReader not giving same results as SQL Developer

182 views Asked by At

The following query on my oracle db gives results that look fine when run in 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. The data type of that column is CLOB. I can not see any pattern as to why some of the rows have a null value and some do not.

Not sure what other information would be helpful...

Does anyone have any ideas on what might be going on?

1

There are 1 answers

8
neutrino On

Your problem may be related to the way that binary data is retrieved with OleDbDataReader.

You should use GetBytes(), and follow this article.