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

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

From: Kevin Old
Subject: Re: Class::DBI not returning consistent results through DBD::ODBC
Date: 21:55 on 02 Jun 2005
On 6/2/05, Perrin Harkins <perrin@xxxx.xxx> wrote:
> 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.
>=20
> There's only one, actually, with some comments, refinements and
> descriptions of one other problem that I posed at the bottom.
>=20
> > For instance, Perrin's first post in Oct 2004,
> > where do I put those subroutines?  In startup.pl or in my Ima/DBI.pm?
>=20
> You put it in your Class::DBI base class.  Overriding db_Main is
> described in the Class::DBI docs.
>=20
> 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.
>=20
> 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.
>=20
> > Perrin, which "workaround" on the CommonProblems page should I be
> > looking at?
>=20
> 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.
>=20
> 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).

Thanks, Perrin.  I applied your db_Main subroutine in to my Class::DBI
base class and it works now!  I get data back in each request!!!

Thanks for your help...sorry I was confused earlier!

Thanks,
Kevin
--=20
Kevin Old
kevinold@xxxxx.xxx

(message missing)

Re: Class::DBI not returning consistent results through DBD::ODBC
Kevin Old 21:55 on 02 Jun 2005

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