in reply to DBI::Sybase sometimes returns nothing, but does not generate an error -> how can I catch this?

Hi,

Keep in mind that stored procedures or queries using the print TSQL statement will send the output as informational error messages rather than in the result set. I'm suspecting this is what you are encountering.

The error you are recieving indicates that there isn't a column with the name ent_id

Jason L. Froebe

Team Sybase member

No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

  • Comment on Re: DBI::Sybase sometimes returns nothing, but does not generate an error -> how can I catch this?

Replies are listed 'Best First'.
Re^2: DBI::Sybase sometimes returns nothing, but does not generate an error -> how can I catch this?
by svenXY (Deacon) on Jan 12, 2005 at 08:43 UTC
    Hi All,

    I might have found a solution to this (it's hard to test as it never fails when called from a shell). However, after having called $sth->execute(), I now use the following:
    if ($sth->{NAME}->[0] ne 'ent_id') { FATAL(" No valid entities! Need to exit"); exit 99; }
    I'll see if this solves my problem, but logically seen, it "should"

    Cheers, Sven
      YOu can also run your query with DBI->trace(3) to see what DBD::Sybase thinks it is doing (what it is sending to the server, and what it is getting back.) This might help you get some better information about what is going on.

      Michael

        Thanks, I'll try that! For the time being, my solution at least enables me to catch this error (bug?) and do something about it.

        Thanks for your help anybody,
        Sven