dbTalk Databases Forums  

Re: Apache:DBI DBD::Informix and dbping

comp.databases.informix comp.databases.informix


Discuss Re: Apache:DBI DBD::Informix and dbping in the comp.databases.informix forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jonathan Leffler
 
Posts: n/a

Default Re: Apache:DBI DBD::Informix and dbping - 09-01-2011 , 09:55 AM






On Thu, Sep 1, 2011 at 02:10, Clive Eisen <clive (AT) serendipita (DOT) com> wrote:

Quote:
I'm using mod_perl and Informix, and therefore Apache:BI and
DBD::Informix
It seems I am running into stale database handles
That is to say a connect in my code 'works' but any operation on the dbh
fails with a
can't call method 'blah' on an undefined value
after a time.

Reading http://search.cpan.org/~phred/**Apac.../lib/Apache/**
DBI.pm <http://search.cpan.org/%7Ephred/Apac.../Apache/DBI.pm

suggests that I need a dbping method and an example is supplied
What 'simple' piece of sql do the team suggest?


Quote:
select 1 from systables where tabid =1

That is the simplest one that works in (almost) any Informix database. To
be safe against 'MODE ANSI' databases, you'd use:

SELECT 1 FROM "informix".systables WHERE TabID = 1

This is safe in a MODE ANSI databases, and any version from 4.00 onwards.

--
Jonathan Leffler <jonathan.leffler (AT) gmail (DOT) com> #include <disclaimer.h>
Guardian of DBD::Informix - v2011.0612 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.