I've used this before and it worked. I'm trying to use it now and it won't return the right number of rows. I ran the query through FROG and got 2 rows which is what I expected...
The Get Diagnostics returns 0 to mycount. All the sql states and codes are 0, so no errors reported.
I'm puzzled.
Code:
Exec SQL Declare C1 Insensitive Cursor for
select field1, field2
from myfile
where order = :OrderNumber and
line = :OrderLine;
Exec SQL
Open C1;
Exec SQL
GET DIAGNOSTICS :mycount = DB2_NUMBER_ROWS;
I'm puzzled.






Comment