We're working with a 4GL routine that uses a series of PREPAREd
SCROLL CURSORs for retrieval purposes only. We've scoured & scoured the 4GL
books to try to find a way to get a simple total of records matched/found
through the SQLCA.SQLERRD[x] technique, but it only works with CURSORs
DECLARED for INSERT (specifically sqlca.sqlerrd[3]). SQLCA.SQLERRD[2]
doesn't return anything but 0, either, regardless of where we position the
LET statement to retrieve the value. We've tried it immediately after:
PREPARE
DECLARE
OPEN
FETCH FIRST
The results are always the same: sqlca.sqlerrd[1 thru 5] = 0.
Now we're having to use a FOREACH loop with an increment counter inside
it; it's a time waster, but we need that total # of records found. Can you
suggest a better way of getting the matched records total?
Bill Williams
Database Programmer
Standard Systems Center, Gunter AFB, AL