|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: RE: 'Connection' test?
Date: Sep 18 1998 2:22PM
Here's a DBDEAD() call for CTlib. Place in CTlib.xs around line 5600
or threabouts:
int
DBDEAD(dbp)
SV * dbp
CODE:
{
ConInfo *info = get_ConInfo(dbp);
CS_INT ret;
ct_con_props(info->connection->connection, CS_GET, CS_CON_STATUS,
&ret, CS_UNUSED, NULL);
RETVAL = ret & CS_CONSTAT_DEAD;
}
OUTPUT:
RETVAL
It'll be in the next release of sybperl.
Michael
Cobb, Thomas writes:
> I have been wondering this as well, does anyone want to venture a reply
> on David's mail?
>
> > -----Original Message-----
> > From: David Carter [SMTP:david@solbors.no]
> > Sent: 03 September 1998 16:03
> > To: SybPerl Discussion List
> > Cc: Eivind Trondsen
> > Subject: 'Connection' test?
> >
> > Hi,
> >
> > I can't see a CTlib equivalent for the DBlib call $dbh ->DBDEAD. Is it
> > enough to say:
> >
> > unless ($dbh) {
> > print "The database connection is dead!\n";
> > }
> >
> > or is something more intricate needed?
> >
> > Many TIA,
> >
> > David Carter, Internet Programming & Security "Most of the shadows
> > SOL Børs AS, Oslo. in life are caused
> > david@solbors.no http://www.solbors.no/ by standing in your
> > Norway's Top Financial Site. own sunshine" R.W. Emerson
>
>
--
Michael Peppler -||- Data Migrations Inc.
mpeppler@mbay.net -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
|