Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

@@Fetch_Status

2 posts in General Discussion Last posting was on 2003-08-12 12:55:59.0Z
JacobT Posted on 2003-08-11 21:20:36.0Z
Sender: 1fb5.3f380838.1804289383@sybase.com
From: JacobT
Newsgroups: ianywhere.public.general
Subject: @@Fetch_Status
X-Mailer: WebNews to Mail Gateway v1.1s
Message-ID: <3f3808b9.1fbb.846930886@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 11 Aug 2003 14:20:57 -0700, 10.22.241.42
Lines: 7
NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
Date: 11 Aug 2003 14:20:36 -0700
X-Trace: forums-1-dub 1060636836 10.22.241.42 (11 Aug 2003 14:20:36 -0700)
X-Original-Trace: 11 Aug 2003 14:20:36 -0700, forums-2-dub.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:1561
Article PK: 3790

I'm trying to use @@Fetch_Status in my while loop in my
script but I don't understand what makes the value of
Fetch_Status change from 0 to some other number. Can someone
explain this to me? I know my loop works but putting a type
counter in there but I want to use Fetch Status instead of
hard coding a counter so that it exits out of the loop at
the proper time. Thanks for you information in advance.


Stephen Rice Posted on 2003-08-12 12:55:59.0Z
From: "Stephen Rice" <srice_NOSPAM@ianywhere.com>
Newsgroups: ianywhere.public.general
References: <3f3808b9.1fbb.846930886@sybase.com>
Subject: Re: @@Fetch_Status
Lines: 28
Organization: iAnywhere Solutions
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: srice-pc.sybase.com
X-Original-NNTP-Posting-Host: srice-pc.sybase.com
Message-ID: <3f38e3df$1@forums-1-dub>
Date: 12 Aug 2003 05:55:59 -0700
X-Trace: forums-1-dub 1060692959 172.31.141.106 (12 Aug 2003 05:55:59 -0700)
X-Original-Trace: 12 Aug 2003 05:55:59 -0700, srice-pc.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:1566
Article PK: 3795

@@fetch_status will be changed each time you fetch from your cursor. When
the value is 0 you got data, -1 means some sort of error occurred and -2
means EOF.

Its is not useful for counting rows just detecting errors/EOF

/steve

--
Stephen Rice
Technical Services Manager
iAnywhere Solutions

- Please Post-
Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere
Developer Community at www.ianywhere.com/developer

<JacobT> wrote in message news:3f3808b9.1fbb.846930886@sybase.com...
> I'm trying to use @@Fetch_Status in my while loop in my
> script but I don't understand what makes the value of
> Fetch_Status change from 0 to some other number. Can someone
> explain this to me? I know my loop works but putting a type
> counter in there but I want to use Fetch Status instead of
> hard coding a counter so that it exits out of the loop at
> the proper time. Thanks for you information in advance.