When SAP ASE caches a statement, it changes the statement from an ad hoc query to a lightweight stored procedure.
For example, if you issue sp_bindefault or sp_bindrule in the same batch as the statement that invokes the default or rule without caching the statement, SAP ASE issues error message 540. However, if you cache the statement, SAP ASE binds the default or rule to the column.
create table t1(c1 numeric(5,2) go insert t1 values(3.123) go
To process ad hoc SQL statements using the statement cache: