Thanks. That works... embarrassingly, makes sense too ;))) -Dave-
-----Original Message----- From: mchase Sent: Sunday, February 03, 2002 2:20 PM To: Wren, David; dbi-users Cc: mchase Subject: Re: DBI Oracle Database Handle trouble You are disconnecting from the database handle at the bottom of execsql(). -- Mac :}) ** I normally forward private questions to the appropriate mail list. ** Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.htm Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age. ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, February 03, 2002 10:13 Subject: RE: DBI Oracle Database Handle trouble > First of all, the versions of software I'm running are: > Oracle8i Enterprise Edition Release 8.1.7.2.0 > perl5 (5.0 patchlevel 4 subversion 4) > Solaris 2.6 > > The sample of code which I'm using to test is attached (test.pl), and > the output > I get (including an echo of the first SQL, a result status, an echo of > the > 2nd SQL, and then the error) is as follows: > > BEGIN sp_exec_imm('drop index CMBUS1'); END; > Return Status: 1 > select trade_date, host_cust_id from cm_trade_fact where trade_id > = 210960459 > DBD::Oracle::db prepare failed: (DBD INVALID_HANDLE: > OCIStmtPrepare) at test.pl line 86. > (DBD INVALID_HANDLE: OCIStmtPrepare) at test.pl line 86. > > If I reverse the order of the two SQL statements, to prove that the 2nd > works, then > the output is as follows: > > select trade_date, host_cust_id from cm_trade_fact where trade_id > = 210960459 > Return Status: 1 > 15-MAY-01, WA181862 > BEGIN sp_exec_imm('drop index CMBUS1'); END; > DBD::Oracle::db do failed: (DBD INVALID_HANDLE: OCIStmtPrepare) > at test.pl line 109. > (DBD INVALID_HANDLE: OCIStmtPrepare) at test.pl line 109. > > Finally, if I use a completely separate database handle for the 2nd SQL > statement, > (attached is the code used for this, called test2.pl) it works: > > select trade_date, host_cust_id from cm_trade_fact where trade_id > = 210960459 > Return Status: 1 > 15-MAY-01, WA181862 > BEGIN sp_exec_imm('drop index CMBUS1'); END; > Return Status: 1 Visit our website at http://www.ubswarburg.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.