Hi,
We are using a C program, with embedded SQL, to fetch records from a table in a DB2 database. After fetching 1000 records, we issue a commit. After this, the cursor stops fetching anything. Because of the way the code is written, I don't know what the error message is (it is installed in production), and I can't reproduce the problem in test. The cursor is declared as follows:
EXEC SQL DECLARE MyCursor CURSOR WITH HOLD FOR
SELECT
myfield1,
myfield2,
myfield3
FROM
mytable
ORDER BY
myfield1,
myfield2,
myfield3;
There are hundreds of thousands of records in the table. Why does the cursor presumably error out after fetching 1000 records? Here's my version info:
DB2 v8.1.6.912, Fixpack 6, DB2 Workgroup Server Edition
Windows 2003, service pack 1
Thanks!