Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Reaped: Re: DBI fails to return an error code

by NodeReaper (Curate)
on Oct 09, 2011 at 12:35 UTC ( #930467=note: print w/replies, xml ) Need Help??

in reply to DBI fails to return an error code

This node was taken out by the NodeReaper on Oct 09, 2011 at 13:08 UTC
Reason: [Corion]: Reap: Spam

You may view the original node and the consideration vote tally.

  • Comment on Reaped: Re: DBI fails to return an error code

Replies are listed 'Best First'.
Re: Reaped: Re: DBI fails to return an error code
by dmz (Novice) on Jan 18, 2013 at 01:11 UTC

    Don't know if its bad form to revive this post but I have found a sort of workaround. Note that this is the top link on google search, so its still relevant imho.

    Having finally said goodbye to XP I have had the same problem and it's kicking my butt. Not having errors kick out is very inconvenient, not to mention possibly professionally dangerous! Also adding in die to the execute call creates a false negative!

    All my research points to it being a bug with Windows 7 64 bit. Having just upgraded EVERYTHING in my cpan collection, it looks like its still live.

    The (partial) workaround I found is to call $DBI::rows if $DBI::rows is <0 - specifically -1 then the sql call failed. if it is positive then the call is OK. Have it print out your SQL to the console if -1 and test it in myphpamin or whatever to get the error.

    Point is, for insert/update at least its a reliable way to at least get some idea of how your statement worked!

    Now I haven't tested much further than inserting. But I imagine that in other cases it should perform in a similar way.

    It's not groundbreaking, I know, but I hope it helps someone else who banged their head against the wall over this!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://930467]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2018-02-25 00:28 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (312 votes). Check out past polls.