in reply to DBI Not working Part 2
in thread DBI Not working
Ok, not that this explains it, but it appears that after a call to prepare() is made, the database reported by select db_name() is the current users default database . The database remains as your default database until the excution has completed.
To show this, i added calls to get_db_name() before the prepare() and also between prepare() and execute(). Keep in mind, that the prepare(),execute() and fetch() modle is lower level than isql, and therefore does cause some odd behaviour when other database work is done between prepare() and the sth finish.
So, in short, it appears to be to be an issue with how Sybase (or ct-lib) handles the excution. I would not imagine there is a fix, because it is a question of architecture. But, you could submit a bug to MPeppler (DBD::Sybase author) and see what he has to say.
Thus spake the Master Programmer:
"When you have learned to snatch the error code from the trap frame, it will be time for you to leave."
-- The Tao of Programming