Cursor not in a valid state

Error constant SQLE_CURSOR_INVALID_STATE
ODBC 2 state 24000
ODBC 3 state 24000
Severity 16
SQLCODE -853
SQLSTATE 24000
Sybase error code 557
 Probable cause