Re: Class::DBI not returning consistent results through DBD::ODBC

[prev] [thread] [next] [Date index for 2005/06/02]

From: Perrin Harkins
Subject: Re: Class::DBI not returning consistent results through DBD::ODBC
Date: 21:45 on 02 Jun 2005
On Thu, 2005-06-02 at 15:47 -0400, Kevin Old wrote:
> I
> have looked at the UsingWithModPerl page and there seem to be
> *several* solutions, but I'm not sure which to try first or in
> conjuction with, etc.

There's only one, actually, with some comments, refinements and
descriptions of one other problem that I posed at the bottom.

> For instance, Perrin's first post in Oct 2004,
> where do I put those subroutines?  In startup.pl or in my Ima/DBI.pm?

You put it in your Class::DBI base class.  Overriding db_Main is
described in the Class::DBI docs.

I have a patch to Ima::DBI which fixes this stuff, but I'm not satisfied
with it and am trying to rework it.  Maybe it would be better as a
plugin instead, since it complicates the internals of Ima::DBI's
connection management somewhat.

By the way, that Class::DBI::Plugin::Connection you're using is not
useful.  In all recent DBI versions, connect_cached() already uses
Apache::DBI if it's loaded.  I should e-mail that guy and ask him to
take it down.

> Perrin, which "workaround" on the CommonProblems page should I be
> looking at?

It's just a grab bag of issues to consider which I gave you because I
couldn't really tell much from your error description.  You say the page
is blank and no new connection is made, but you don't say whether you
verified that your code is being run or determined which part of it is
failing.

Because you aren't using the code from the wiki mod_perl page, you will
only see Apache::DBI debug info the first time you connect in each
process, not on every request.  That's because the handle is stored in a
closure and Apache::DBI never gets called again on successive requests
(which also means you are not getting the cleanup handler).

- Perrin

(message missing)

Re: Class::DBI not returning consistent results through DBD::ODBC
Perrin Harkins 21:45 on 02 Jun 2005

Generated at 16:37 on 28 Jul 2005 by mariachi v0.52