Home » Developer & Programmer » Precompilers, OCI & OCCI » Rows getting jumbled when fetched using OCIStmtFetch2() (11.2.0.2, Windows 64 bit)
Rows getting jumbled when fetched using OCIStmtFetch2() [message #602392] Wed, 04 December 2013 00:00
srkhedkar
Messages: 1
Registered: December 2013
Junior Member
I have a hierarchical data structure in one of my table called parts.
The structure of the table is something like this
ParentPart, ComponentPart, Data
P1,P2,xyz
P2,P3,xyz
P3,P4, xyz
P4,P5, xyz
P7,P8, xyz ......
.....
....

When I fire a connect by query to traverse the relationship starting with part P1 in sqlplus then I get
Following output.
P1,P2,xyz
P2,P3,xyz
P3,P4, xyz
P4,P5, xyz

However, when I fire the same query using OCI APIs and fetch the results using OCIStmtFetch2 API then I get jumbled output. I am getting Row P3,P4, xyz as the first row in the data buffer.
I found that the rows in the data buffer are jumbled and differ from the SQLplus output.
I am using scrollable cursors to fetch the data. And using Oracle 11.2.0.2 database.

My questions are:
1. Why the rows are getting jumbled when fetched using OCIStmtFetch2 API.
2. What SQLplus is doing to display the output in logically correct order.
Previous Topic: How to compile ProC ?
Next Topic: How to debug Pro*C on AIX?
Goto Forum:
  


Current Time: Thu Mar 28 12:20:50 CDT 2024