When using the SQL_MoveFirsB, SQL_MoveNextB, SQL_MoveLastB, and SQL_MovePrevB functions, the returned value *ERROR* usually means end-of-file (EOF). However, it is possible for other errors to occur. For a consistent check for EOF, use the SQL_LastFullErr function.
To check for end-of-file (EOF):
/free // If error indicated, see if it's BOF/EOF if rtnRecord = '*ERROR*'; errMsg = SQL_LastFullErr(stateDS.socketSel); if (errMsg = '-1 End of file reached.' or errmsg = '-2 Beginning of file reached.'); pEof = *on; endIf; endIf; /end-free
Still have questions? We can help. Submit a case to Technical Support.