The option '%1' cannot be set from within a procedure

Item Value
SQLCODE -217
Constant SQLE_OPTION_IN_PROCEDURE
SQLSTATE 42W53
Sybase error code 5878
ODBC 2 State 42000
ODBC 3 State 42000

Probable cause 

The option specified in the SET OPTION statement cannot be set from within a procedure.