|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Suppress return code of SP
Date: Oct 8 1999 9:03PM
YongHong.Deng@bmo.com writes:
> Hello,
>
> I wrote a small program like the following:
>
> But when I execute a stored procedure, for example, sp_who, the following results are displayed:
>
> spid status loginame hostname blk dbname cmd
> 1 running sa 0 master SELECT
> 2 sleeping 0 master NETWORK HANDLER
> 3 sleeping 0 master DEADLOCK TUNE
> 4 sleeping 0 master MIRROR HANDLER
> 5 sleeping 0 master HOUSEKEEPER
> 6 sleeping 0 master CHECKPOINT SLEEP
> COL(1)
> 0
>
> I was wondering how to suppress the last 2 lines?
You need to check the result type (the output from ct_results()). If
the result type == CS_STATUS_RESULT then it's the return code from a
stored proc.
Please read the docs on ct_results() in the Sybase OpenClient manuals
(available on http://sybooks.sybase.com, look under middleware)
Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler@peppler.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com
|