Re: adding key to DB object

From: Tim Bunce (Tim.Bunce_at_pobox.com)
Date: 03/29/05


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.



Relevant Pages

  • Re: adding key to DB object
    ... It may look like a hash, but when you set or query ... you are actually calling the STOREand FETCHmethods of ... j> the DBD and by DBI, ...
    (perl.dbi.users)
  • RE: DBI, Oracle
    ... Do I need to start from scratch with Perl - or just load the DBI or DBD module? ... intended recipient, please be aware that any disclosure, copying, distribution ... sender of the delivery error by replying to this message, or notify us by ...
    (perl.dbi.users)
  • Re: 11 meter beam
    ... Fundamental relationships depend on dBi, it is dBd that is the fudge. ... dBd seems to have its popularity from the mistaken view by some that because it is not possible to construct a real isotropic radiator, that dBi doesn't have a real meaning. ...
    (rec.radio.amateur.antenna)
  • Re: 11 meter beam
    ... Fundamental relationships depend on dBi, it is dBd that is the fudge. ... dBd seems to have its popularity from the mistaken view by some that because it is not possible to construct a real isotropic radiator, that dBi doesn't have a real meaning. ...
    (rec.radio.amateur.antenna)
  • Re: DBI v2 - The Plan and How You Can Help
    ... Darren Duncan wrote: ... of them, but all of this is really a DBD, not a DBI, issue. ... > DBD to decide whether to actually do anything with it immediately or not. ... a database) in your BEGIN block, and execute thousands of times after that. ...
    (perl.dbi.users)