Error opening cursor

Error constant SQLE_OPEN_CURSOR_ERROR
ODBC 2 State 24000
ODBC 3 State 24000
Severity 15
SQLCODE –171
SQLSTATE 07003
Sybase error code 102
Probable cause

You attempted to open a cursor on a statement that is not SELECT, CALL or EXEC.