RE: embedding DB handle in object (was RE: adding key to DB objec t)

From: Brandon Metcalf (bmetcalf_at_nortel.com)
Date: 03/30/05


Date: Tue, 29 Mar 2005 17:37:22 -0600 (CST)
To: "Rutherdale, Will" <Will.Rutherdale@sciatl.com>

W == Will.Rutherdale@sciatl.com writes:

 W> my $dbh = DBI->connect( .... );
 W> my $big_honkin_data_structure = { house => "semi", car => "oldsmobile",
 W> dbh
 W> => $dbh,
 W> age => 43, ... };
 W> ...

 W> myFavouriteSubroutine( $big_honkin_data_structure->{dbh}, 3 );

 W> ...

 W> sub myFavouriteSubroutine
 W> {
 W> my ( $dbh, $num ) = @_;
 W> my $data = $dbh->selectall_arrayref( .... );
 W> ....
 W> }

This is pretty much what I'm doing. Tim provided the solution which
was to remove DBI::db from @ISA.

-- 
Brandon


Relevant Pages

  • Re: getting rid of the "Issuing rollback()" warning
    ... > Tim. ... > transaction and, for drivers that can, use that to skip the warning. ... Currently only the $dbh domethod and the $sth execute, execute_array, ... So calling execute() on a $sth also sets the C ...
    (perl.dbi.users)
  • Re: VPN client behind ISA server drops connection
    ... See if your GRE port is enabled also protocol 47 is enabled. ... "Tim Anderson" wrote in message ... VPN to SBS 2003. ... > If I bypass ISA the VPN ...
    (microsoft.public.isa.vpn)
  • Re: Losing my rag with ISA and CA ETrust
    ... Thanks Andrew. ... I've raised two email support calls with CA who tell me it's an ISA ... > Hi Tim ... >> Kind Regards ...
    (microsoft.public.windows.server.sbs)
  • Re: ISA 2004: 502 Proxy-Fehler
    ... ich hatte mal ein ähnliches problem mit dem isa 2006. ... gruss, jens mander... ... "Tim" schrieb im Newsbeitrag ... ob ich die Seite vom Client oder direkt am ISA aufrufe. ...
    (microsoft.public.de.german.isaserver)
  • Re: $DBI::err not reset before connect_cached()
    ... > Thanks Tim, ... Looking at the trace I see what's going on. ... The connect_cachedmethod perhaps ought to explicitly reset the ... error state of the $dbh because it's separate to the $dbh error ...
    (perl.dbi.users)