amj has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

If I do the following...
$dbproc = Sybase::DBlib->dblogin( $usr, $pwd, $svr); $dbproc = Sybase::DBlib->dblogin( $usr, $pwd, $svr);
What happens to the first connection to the database? Is it still active? Or is it closed by the second login? Or is it something else?

Any help/comments are much appreciated. Thanks,
amj

Replies are listed 'Best First'.
Re: Sybase::DBlib and database connection
by planetscape (Chancellor) on Jan 24, 2006 at 10:32 UTC
Re: Sybase::DBlib and database connection
by mpeppler (Vicar) on Jan 25, 2006 at 16:45 UTC
    The first connection should get closed because the DESTROY method for Sybase::DBlib should get called when the $dbproc variable gets overwritten.

    Michael