-
Notifications
You must be signed in to change notification settings - Fork 88
Description
-
What version of ODPI-C are you using (see dpi.h)?
5.6.2 -
What OS (and version) is your application on?
Linux/Manjaro -
What compiler (and version) did you use?
g++ 15.2.1 -
What is your version of the Oracle Client (e.g. Instant Client)? How was it installed? Where it is installed?
instantclient 23.9 -
What is your Oracle Database version?
19.26 -
What is the
PATH
environment variable (on Windows) orLD_LIBRARY_PATH
(on Linux) set to?
/home/oracle/instantclient_23_9 -
What environment variables did you set? How exactly did you set them?
-
What problem or error(s) you are seeing?
dpiStmt_fetch misbehaves then scrolling backwards. -
Do you have a runnable code snippet to describe the problem?
is attached
please see the attached code.
code fetches from query (select level from dual connect by level<=5) in forward mode. after that, the "resultset" points to the row with level value 5. then i do a loop with dpiStmt_scroll DPI_MODE_FETCH_PRIOR and a dpiStmt_fetch - so basically a reverse fetch.
the output:
reverse: loop: 1 - found: 1 buff: 3
lvl-prior: 4
reverse: loop: 2 - found: 1 buff: 2
lvl-prior: 3
reverse: loop: 3 - found: 1 buff: 1
lvl-prior: 2
reverse: loop: 4 - found: 1 buff: 0
lvl-prior: 1
reverse: loop: 5 - found: 1 buff: 0
lvl-prior: 4
reverse: loop: 6 - found: 1 buff: 0
lvl-prior: 4
reverse: loop: 7 - found: 1 buff: 0
done
Why does the variable "found" have the value 1 in line "reverse: loop: 5 - found: 1 buff: 0" ?
shouldnt this be 0 to mark the "end" of the resultset?
Why does the last dpiStmt_getQueryValue fetch the value 4 for the lvl again?
thx®ards,
gerald