Loading ...
Sorry, an error occurred while loading the content.

Re: Using DBI and Apache::DBI together

Expand Messages
  • Stas Bekman
    ... I think the Apache::DBI manpage should mention that DBI s feature (plus example), since it s very relevant. Please send a doc patch to Ask. --
    Message 1 of 8 , Aug 1, 2004
    • 0 Attachment
      Boris Zentner wrote:
      > Hi,
      >
      > Am Mittwoch 28 Juli 2004 12:20 schrieb Tom Schindl:
      >
      >>Boris Zentner wrote:
      >
      >
      > [...]
      >
      >
      >>># bypass Apache::DBI
      >>>$dbh = DBI->connect($data_source, $username, $password, {
      >>>dbi_connect_method => 'connect' }) || die;
      >>
      >>I knew there is such a parameter, but couldn't remember it. So I took a
      >>look at Apache::DBI's manpage but this parameter is not mentionned. Have
      >>I missed that somewhere or where did you find it? If its not in the
      >>man-page it might me good idea to contact the module author and ask :-)
      >>him to add this parameter.
      >>
      >
      >
      > Thats because you lokked in the Apache::DBI manpage.
      > Look in the DBI man page:
      >
      > The "dbi_connect_method" attribute can be used to
      > specify which driver method should be called to estab-
      > lish the connection. The only useful values are 'con-
      > nect', 'connect_cached', or some specialized case like
      > 'Apache::DBI::connect' (which is automatically the
      > default when running within Apache).

      I think the Apache::DBI manpage should mention that DBI's feature (plus
      example), since it's very relevant. Please send a doc patch to Ask.

      --
      __________________________________________________________________
      Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
      http://stason.org/ mod_perl Guide ---> http://perl.apache.org
      mailto:stas@... http://use.perl.org http://apacheweek.com
      http://modperlbook.org http://apache.org http://ticketmaster.com

      --
      Report problems: http://perl.apache.org/bugs/
      Mail list info: http://perl.apache.org/maillist/modperl.html
      List etiquette: http://perl.apache.org/maillist/email-etiquette.html
    • Tom Schindl
      Ask has already stated that he s going to include it in his next release, I have already filed a doc-patch at rt.cpan.org Tom ... -- Report problems:
      Message 2 of 8 , Aug 3, 2004
      • 0 Attachment
        Ask has already stated that he's going to include it in his next
        release, I have already filed a doc-patch at rt.cpan.org

        Tom

        Stas Bekman wrote:

        > Boris Zentner wrote:
        >
        >> Hi,
        >>
        >> Am Mittwoch 28 Juli 2004 12:20 schrieb Tom Schindl:
        >>
        >>> Boris Zentner wrote:
        >>
        >>
        >>
        >> [...]
        >>
        >>
        >>>> # bypass Apache::DBI
        >>>> $dbh = DBI->connect($data_source, $username, $password, {
        >>>> dbi_connect_method => 'connect' }) || die;
        >>>
        >>>
        >>> I knew there is such a parameter, but couldn't remember it. So I took a
        >>> look at Apache::DBI's manpage but this parameter is not mentionned.
        >>> Have
        >>> I missed that somewhere or where did you find it? If its not in the
        >>> man-page it might me good idea to contact the module author and ask :-)
        >>> him to add this parameter.
        >>>
        >>
        >>
        >> Thats because you lokked in the Apache::DBI manpage. Look in the DBI
        >> man page:
        >>
        >> The "dbi_connect_method" attribute can be used to
        >> specify which driver method should be called to estab-
        >> lish the connection. The only useful values are 'con-
        >> nect', 'connect_cached', or some specialized case like
        >> 'Apache::DBI::connect' (which is automatically the
        >> default when running within Apache).
        >
        >
        > I think the Apache::DBI manpage should mention that DBI's feature
        > (plus example), since it's very relevant. Please send a doc patch to Ask.
        >


        --
        Report problems: http://perl.apache.org/bugs/
        Mail list info: http://perl.apache.org/maillist/modperl.html
        List etiquette: http://perl.apache.org/maillist/email-etiquette.html
      • Boris Zentner
        ... Good to know, Unfortunely I have started it also, currently I have no internet at work ;-) diff -Nur a/DBI.pm b/DBI.pm ... +++ b/DBI.pm 2004-08-03
        Message 3 of 8 , Aug 3, 2004
        • 0 Attachment
          Am Dienstag 03 August 2004 16:16 schrieb Tom Schindl:
          > Ask has already stated that he's going to include it in his next
          > release, I have already filed a doc-patch at rt.cpan.org
          >

          Good to know, Unfortunely I have started it also, currently I have no internet
          at work ;-)

          diff -Nur a/DBI.pm b/DBI.pm
          --- a/DBI.pm 2004-08-03 08:39:11.000000000 +0200
          +++ b/DBI.pm 2004-08-03 23:28:09.422608600 +0200
          @@ -309,6 +309,16 @@
          the initial data_source sets AutoCommit = 0. It will not be used, if
          AutoCommit
          will be turned off, after the connect has been done.

          +Sometimes you want to bypass Apache::DBI's persistent connection for a
          +database handle, while others run under Apache::DBI's control. This can be
          +reached with DBI's connect method. This example assumes that the script
          +is running under Apache::DBI's control.
          +
          + # Bypass Apache::DBI
          + my $dbh2 = DBI->connect( $data_source, $user, $passwd,
          + { dbi_connect_method => 'connect' }) || die $DBI::errstr;
          +
          +
          This module plugs in a menu item for Apache::Status. The menu lists the
          current database connections. It should be considered incomplete because of
          the limitations explained above. It shows the current database connections

          --
          Report problems: http://perl.apache.org/bugs/
          Mail list info: http://perl.apache.org/maillist/modperl.html
          List etiquette: http://perl.apache.org/maillist/email-etiquette.html
        Your message has been successfully submitted and would be delivered to recipients shortly.