statement's size limit is invalid.

Item Value
SQLCODE -674
Constant SQLE_INVALID_CURSOR_RANGE
SQLSTATE 09W07
Sybase error code 13713
ODBC 2 State 42000
ODBC 3 State 42000

Probable cause 

FIRST or TOP n are used in a SELECT statement to limit the size of a result. The size limit 'n' must be a constant integer greater than 0 and less than 32767.