<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3199" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=979160209-12022008><FONT face=Arial color=#0000ff size=2>We
have a infrequent error occuring where an Sybase sql statement occasionally
reports a database object doesn't exist when it clearly does</FONT></SPAN></DIV>
<DIV><SPAN class=979160209-12022008><FONT face=Arial color=#0000ff
size=2>e.g.</FONT></SPAN></DIV><SPAN class=979160209-12022008>
<DIV dir=ltr align=left><FONT size=2>[2008/02/07 20:28:34]
Sybase.pm
DEBUG - 46747 - </FONT><FONT color=#ff0000><FONT size=2>select runtime
from ab_books where book = ? and batch = ? and status = 'FINISHED' order by
starttime<BR>[2008/02/07 20:28:34]
Sybase.pm
DEBUG - 46747 - Server message:<BR></FONT><FONT size=2><STRONG>Message
number: 208, Severity 16, State 1, Line 1<BR>Server 'mint' Procedure
'DBD1687'<BR>Message String: <FONT color=#ff00ff>ab_books not found</FONT>.
Specify owner.objectname or use sp_help to check whether the object exists
(sp_help may produce lots of output).<BR></STRONG>[2008/02/07 20:28:34]
Sybase.pm
ERROR - 46747 - SQL prepare failed:<BR></FONT></DIV>
<DIV><SPAN class=316013412-08022008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=316013412-08022008><SPAN class=979160209-12022008><FONT
face=Arial color=#0000ff size=2>The Perl code producing this frequently switches
between databases (with a use statement) and we suspect that the error is caused
by a use statement failing silently and so is looking on the wrong database for
the object.</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=316013412-08022008><SPAN class=979160209-12022008><FONT
face=Arial color=#0000ff size=2></FONT></SPAN></SPAN> </DIV>
<DIV><SPAN class=316013412-08022008><SPAN class=979160209-12022008><FONT
face=Arial color=#0000ff size=2>Anyone know of a way of reliably obtaining the
current database context with a DBI database of statement handle
?</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=316013412-08022008><SPAN class=979160209-12022008><FONT
face=Arial color=#0000ff size=2>I have already suggested adding
" {syb_show_sql => 1}" to the conenction statement to include the actual
sql being run in the DBI::errstr (in case the problem is due to the parameters
passed inn the place holders.</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=316013412-08022008><SPAN class=979160209-12022008><FONT
face=Arial color=#0000ff size=2></FONT></SPAN></SPAN> </DIV>
<DIV><SPAN class=316013412-08022008><SPAN class=979160209-12022008><FONT
face=Arial color=#0000ff size=2></FONT></SPAN></SPAN> </DIV>
<DIV><SPAN class=316013412-08022008><SPAN class=979160209-12022008><FONT
face=Arial color=#0000ff size=2>Cheers</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=316013412-08022008><SPAN class=979160209-12022008><FONT
face=Arial color=#0000ff size=2>Tony</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=316013412-08022008><FONT face=Arial
color=#0000ff></FONT></SPAN></FONT></SPAN> </DIV>
<DIV> </DIV>
<DIV align=left><FONT face=Arial size=2>-- </FONT></DIV>
<DIV> </DIV></BODY></HTML>
<BR>
<BR>
<P><B><FONT SIZE=2 FACE="Arial">********************************************************************** </FONT></B></P>
<P><B><FONT SIZE=2 FACE="Arial">This is a commercial communication from Commerzbank AG.</FONT></B></P>
<BR>
<P><B><FONT SIZE=2 FACE="Arial">This communication is confidential and is intended only for the person to whom it is addressed. If you are not that person you are not permitted to make use of the information and you are requested to notify <mailto:LONIB.Postmaster@commerzbankib.com> immediately that you have received it and then destroy the copy in your possession.</FONT></B></P>
<BR>
<P><B><FONT SIZE=2 FACE="Arial">Commerzbank AG may monitor outgoing and incoming e-mails. By replying to this e-mail you consent to such monitoring. This e-mail message and any attached files have been scanned for the presence of computer viruses. However, you are advised that you open attachments at your own risk.</FONT></B></P>
<BR>
<P><B><FONT SIZE=2 FACE="Arial">This email was sent either by Commerzbank AG, London Branch, or by Commerzbank Corporates & Markets, a division of Commerzbank. Commerzbank AG is a limited liability company incorporated in the Federal Republic of Germany. Registered Company Number in England BR001025. Our registered address in the UK is 60 Gracechurch Street, London, EC3V 0HR. We are regulated by the Financial Services Authority for the conduct of investment business in the UK and we appear on the FSA register under number 124920. </FONT></B></P>
<BR>
<P><B><FONT SIZE=2 FACE="Arial">**********************************************************************</FONT></B></P>
<BR>