Local connection ID does not refer to the current database

Error constant SQLE_LOCAL_CONNECTION_NOT_TO_CURRENT_DB
ODBC 2 State ERROR
ODBC 3 State ERROR
Severity 16
SQLCODE –997
SQLSTATE WO025
Sybase error code 710
Probable cause

The specified connection ID is for a connection to a database other than the current database.