Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

DBI Fetches don't work

by ido50 (Scribe)
on Nov 12, 2004 at 13:31 UTC ( [id://407350]=perlquestion: print w/replies, xml ) Need Help??

ido50 has asked for the wisdom of the Perl Monks concerning the following question:

In continuation with my previous node, I have found out that, as oppose to my previous suspicion, it's not the SQL INSERT statements that don't work on my database (SQLite on a FreeBSD server), but actually the DBI fetch routines. Using any of the following subroutines: fetchrow_array, fetchrow_arrayref, fetchrow_hashref, dump_results after executing a SELECT statement causes the program to exit silently, giving no error messages from RaiseError. Checking DBI->err after a fetch statement is impossible since the program exits before getting to the check.

Anyone knows why this might happen?
Thanks,
Ido.

-------------------------
Live fat, die young

Replies are listed 'Best First'.
Re: DBI Fetches don't work
by mpeppler (Vicar) on Nov 12, 2004 at 13:49 UTC
      Well I've read it, but it doesn't really match my problem. That node talks about using select routines with a pre-prepared statement handle. My $sth is fresh...

      -------------------------
      Live fat, die young
        Turn on DBI tracing (DBI->trace(4) or higher) to see what may be going on. Check to see if your program is dying due a signal of some sort (SEGV, or other) - enable core dumps (ulimit -c unlimited) to try to get a core that you can use to get a stack trace (if a core is generated).

        Michael

Re: DBI Fetches don't work
by steves (Curate) on Nov 12, 2004 at 13:45 UTC

    Have you tried putting the exiting call in an eval block to catch the error? Something like:

    eval { $sth->fetch(); }; print "fetch error: $@\n";

      Tried, no luck...

      -------------------------
      Live fat, die young

        Yeah, after I posted that I was thinking, if you see no error you're not going to catch one via eval ... My next step would usually be to go to the source and try to add some debug and/or try to get in touch with some people intimate with the code.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://407350]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2024-04-16 07:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found