PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Mick Ghazey <mghazey at yahoo dot com>
Subject: Re: Stored proc result sets
Date: Jun 4 1998 8:08PM

Thanks, Michael. That was very helpful.

Say, is this discussion list archived anywhere?




---Michael Peppler  wrote:
>
> Mick Ghazey writes:
>  > We have a stored procedure that prints messages to stdout. Will
these
>  > messages be returned as in the result set(s)?
> 
> As in
> 
> 	print "this is a message from the sproc"
> 
> ?
> 
> If so these are routed to the client's message handler. Please see
> sybutil.pl or ctutil.pl (in the lib directory of the Sybperl
> distribution, also in the $PERL5LIB/site_perl directory if sybperl has
> been normally installed). Also see the discussion on message handlers
> in (or server callbacks) in teh Sybase OpenClient docs).
> 
>  > 
>  > How do I know how many result sets a stored procedure returns?
> 
> You won't know until you run the sproc. In addition the number of
> result sets can very well be variable. So you should code your
> programs to be able to handle an unknown number of result sets, by
> looping over dbresults() until it returns NO_MORE_RESULTS, or by
> looping over ct_results() until it stops returning CS_SUCCEED.
> 
> Michael
> -- 
> Michael Peppler         -||-  Data Migrations Inc.
> mpeppler@datamig.com    -||-  http://www.mbay.net/~mpeppler
> Int. Sybase User Group  -||-  http://www.isug.com
> 
> 

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com