PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: David Hajoglou <hojo at greenland dot i-tel dot com>
Subject: Re: passing $dbh around
Date: Jun 10 1999 9:59PM

>  > 
>  > script
>  > ...
>  > $var = &itel::itel_lib::somefunc($dbh);
>  > ...
>  > 
> 
> The way you're doing it in the snippet above is just fine. A database
> handle is just a normal scalar, so you can pass it around as much as
> you like.
> 
Does this copy the handle when I pass it into the module?

sub somefunc {
	my $newdbh = @_;
...
}

The reason I am asking is that we are connecting to an MSSQL database that
has a user limmit.  As a result we are finding out selves running out of
logins.  We are doing everything to keep the number of handles down.
Idealy, persistant handles would be the way to go.