Cursor has not been declared

Error constant SQLE_CURSOR_NOT_DECLARED
ODBC 2 State 24000
ODBC 3 State 24000
Severity 16
SQLCODE –170
SQLSTATE 24W01
Sybase error code 557
Probable cause

You attempted to OPEN a cursor that has not been declared.