same SERVER, but different database? As you suggested Arnoldo, the use command will work.
string ls_usedatabase
ls_usedatabase = "USE ThatDatabase"
execute immediate :ls_usedatabase using sqlca;
just make sure that the login has permissions in the database you are changing to.
note: this does not work in appeon
also, i didn't try this in ASE, only sql server. should still work