Hi and thanks for the quick reply!

Actually, I had not set RaiseError before to be able to handle errors myself via the handle_db_error() function (as I use log4perl).

I was hoping setting RaiseError would eventually solve my problem, but it doesn't look like it does. Just dieing is not what I'm looking for ;-)

I have the strange feeling that this driver sometimes doesn't completely work.
I connect to a MSSQL database in the States and I'm in Germany. I have seen these errors where no error is reported a couple of times now.
Actually, the starnghe thing is that the resultset is empty although it shouldn't be, but no error is generated.

What I want to achieve at least is to find out if the resultset is empty before calling fetchall_hashref and assignning it to a variable.
Will try with eval, but have so far no idea how to prevent this error from showing up on stdout/stderr.

Cheers, Sven

In reply to Re^2: DBI::Sybase sometimes returns nothing, but does not generate an error -> how can I catch this? by svenXY
in thread DBI::Sybase sometimes returns nothing, but does not generate an error -> how can I catch this? by svenXY

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.