Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://930467]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2014-08-23 17:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (175 votes), past polls