Result set not allowed from within an atomic compound statement

Item Value
SQLCODE -222
Constant SQLE_RESULT_NOT_ALLOWED
SQLSTATE 3BW02
Sybase error code 13655
ODBC 2 State ERROR
ODBC 3 State ERROR

Probable cause 

You used a SELECT statement with no INTO clause or a RESULT CURSOR statement within an atomic compound statement.