develooper Front page | perl.beginners | Postings from February 2002

Sybase & Perl DBI

Angus Laycock
February 12, 2002 14:43
Sybase & Perl DBI
Message ID:

I have written a script the handles calls to a Sybase Database. The only problem I have is handling the "Return Code" from Stored Procedures. 

I have gone through the PERL DBI book but the only reference I can find in the Appendix(Page 326), it is to do with syb_result_type. 

I have used the syb_more_results attribute to handle all the statements the Stored Procedure puts out and this is great. I am having a problem trying to interrogate syb_result_type.  Should I reference this before syb_more_results? 

The code I put in is just like in the book;

    while ($data = $sth->fetch() {
            print "Message $data\n";
    } while ($sth->{syb_more_results});

I need to find out if a return code has been passed back. It currently just prints it out and I need to exit the script with it.

Does anyone have an example of handling the return code?


Gus Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About