Re: How to call DBD::Oracle's dbms_output_get from within a DBIx



Tim Bunce wrote:
On Wed, Feb 21, 2007 at 04:25:54PM +0000, Martin J. Evans wrote:
Hi,

I have DBIx::Log4perl which is currently connected to a DBD::Oracle. In DBIx::Log4perl::st::execute I want to call DBD::Oracle's dbms_get_line which is usually (from applications) called like this:

@lines = $dbh->func('dbms_output_get');

As I'm in st::execute I have a $sth and can get hold of a $dbh.

I'd expect this to work:

$dbh = $sth->FETCH('Database');
@lines = $dbh->func('dbms_output_get');

Tim.



Thanks Tim, but that does not appear to work. In my DBIx::Log4perl::execute method I now have (simplified):

sub execute {
my ($sth, @args) = @_;

my $ret = $sth->SUPER::execute(@args);

my $dbh = $sth->FETCH('Database');
my @d = $dbh->func('dbms_output_get');

return $ret;
}

and I still get

Deep recursion on subroutine "DBD::Oracle::db::dbms_output_get"

dbms_output_get does create a new statement, prepare and execute it and it appears when execute is called it ends up back in my DBIx::Log4perl::execute method. I don't understand why this happens :-(

Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
.



Relevant Pages

  • Re: $sth->{NAME} doesnt work
    ... > Tim Bunce wrote: ... Undef could mean any of those and it's not ... > need to execute() first. ... > Or consider porting a program from one DBD driver to another. ...
    (perl.dbi.users)
  • Re: How to call DBD::Oracles dbms_output_get from within a DBIx
    ... Tim Bunce wrote: ... dbms_output_get does create a new statement, prepare and execute it and it appears when execute is called it ends up back in my ... # execute failed and an error handler was called ... # successfully on it changed errstr/err in another ...
    (perl.dbi.users)
  • Re: what does $dbh->execute return for a select?
    ... On 19-May-2006 Tim Bunce wrote: ... I thought for a successful select, ... I've made that change but I still don't think execute is returning what the ... Martin J. Evans ...
    (perl.dbi.users)
  • RE: How to call DBD::Oracles dbms_output_get from within a DBIx
    ... Tim Bunce wrote: ... dbms_output_get does create a new statement, prepare and execute it ... A slightly more efficient (maybe less hackish? ... return $ret; ...
    (perl.dbi.users)
  • Requested Registry Access is Not Allowed
    ... We have several applications that will be executing on multiple machines. ... will execute the apps. ... There are Permission Sets within the framework configuration tool, ... The app fails on the WriteEntry and the exception that is thrown is ...
    (microsoft.public.dotnet.framework)

Quantcast