Too many temporary tables in connection

Error constant SQLE_TOO_MANY_TEMP_TABLES
ODBC 2 State ERROR
ODBC 3 State ERROR
Severity 16
SQLCODE –817
SQLSTATE 52W41
Sybase error code 13823
Probable cause

A CREATE TABLE or DECLARE TABLE statement attempted to create a temporary table, but the resulting number of distinct table ids used for temporary tables in the current connection would exceed the limit.