I was a afraid of that. I didn't have much hope that would work. I did have a lot more hope for using only named tables. I hope that you tried that also?

This is truly a bizarre symptom! I mean it is not like we are testing some obscure, seldom used feature. A SELECT that returns no data is a completely normal thing to have happen! Geez, you can't claim to have a working DBI interface if you can't handle that!

Sounds like something related to TDS level is likely to be the root cause: Sybase TDS Level

I was wondering if there was a way to find out the number of rows that would be returned before asking for the array ref. But no luck. The execute method returns the number of rows affected or the string "0E0" (the "true" but numeric zero value). But that ONLY works for non-Select statements! (like ALTER or whatever).

The only "super kludge" that I can think of is (a)don't use placeholders - which I guess you are doing now or (b) first run a select with (COUNT *) to get the row count and then re-run the select without the COUNT to get the data if count>0. Of course then your DB performance is now 1/2! That's nasty. Not using placeholders is also not so good because the prepare work has to be done again and again. Without a solution to the TDS level issue, I am afraid options are limited.


In reply to Re^4: fetchall_arrayref hangs with placeholders query with no results by Marshall
in thread fetchall_arrayref hangs with placeholders query with no results by TieUpYourCamel

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.