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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.