Michael wrote:
>Let's say we have a table with two entries:
>
>name	nr
>----------
>foo	1
>bar	2

>and a C program doing the following:
>
>..
>i=1;
>exec sql declare C cursor for select name from table where nr=:i;
>i=2;
>exec sql open C;
>..
>
>Which row will be selected?

Since it is usually allowed to do one declare and then many 
open, fetch, fetch ...
open, fetch ....
it has to be i=2 (bar)

Andreas


Wed, 5 Aug 1998 09:10:46 +0200
Andreas Zeugswetter <andreas.zeugswetter@telecom.at>
AW: [HACKERS] Standards question
On Wed, Aug 05, 1998 at 09:10:46AM +0200, Andreas Zeugswetter wrote:
> Since it is usually allowed to do one declare and then many 
> open, fetch, fetch ...
> open, fetch ....
> it has to be i=2 (bar)

Yes, that was what I expected. However, I wanted to be sure.

Michael
-- 
Dr. Michael Meskes		meskes@online-club.de, meskes@debian.org
Go SF49ers! Go Rhein Fire!	Use Debian GNU/Linux! 

Wed, 5 Aug 1998 20:19:19 +0200
"Dr. Michael Meskes" <meskes@online-club.de>
Re: [HACKERS] Standards question