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

Sybase & Perl DBI

From:
Angus Laycock
Date:
February 12, 2002 14:43
Subject:
Sybase & Perl DBI
Message ID:
00ad01c1b416$ef7e5a40$f2438cd4@mralaycock
Hi,

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;

do{
    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?

Thanks

Gus



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About