Re: adding key to DB object
From: Tim Bunce (Tim.Bunce_at_pobox.com)
Date: 03/29/05
- Next message: Brandon Metcalf: "Re: adding key to DB object"
- Previous message: Felix Geerinckx: "Re: cacheing problem"
- In reply to: Brandon Metcalf: "Re: adding key to DB object"
- Next in thread: Brandon Metcalf: "Re: adding key to DB object"
- Reply: Brandon Metcalf: "Re: adding key to DB object"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 29 Mar 2005 21:18:52 +0100 To: Brandon Metcalf <bmetcalf@nortel.com>
On Tue, Mar 29, 2005 at 12:20:09PM -0600, Brandon Metcalf wrote:
> j == jeff@vpservices.com writes:
>
> j> No, that's wrong. It may look like a hash, but when you set or query
> j> attributes, you are actually calling the STORE() and FETCH() methods of
> j> the DBD and of DBI. You can only set attributes that can be handled by
> j> the DBD and by DBI, you can't invent new attributes.
Unless they start with "private_".
If you enable trace you'll see a message like
$h->{commitflag}=1 ignored for invalid driver-specific attribute
> Ah, got it. Basically, what I'm trying to do is track whether I've
> encountered any errors during a transaction within the object itself,
> so I can do something like:
>
> eval { $dbh->execute; };
> $dbh->{commitflag} = 0 if $@;
>
> Is there some existing attribute that will do what I need?
$dbh->{private_commitflag} would work.
Tim.
- Next message: Brandon Metcalf: "Re: adding key to DB object"
- Previous message: Felix Geerinckx: "Re: cacheing problem"
- In reply to: Brandon Metcalf: "Re: adding key to DB object"
- Next in thread: Brandon Metcalf: "Re: adding key to DB object"
- Reply: Brandon Metcalf: "Re: adding key to DB object"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|