In article <2e36a64b%fido.de@p42.f205.n6000.z242.fidonet.org>
Joerg_Spilker@daolin.fido.de "Joerg Spilker" writes:
> Hi all,
>
> i've the following problem: I declared a cursor for a prepared select (sums
> about two field, divided into groups over 4 fields).
>
> This cursor is used in function in the following way:
>
> OPEN q_cursor USING a,b,c,d,e,f,g
> FETCH q_cursor INTO x,y,z
> WHILE STATUS <> NOTFOUND
> calculate something
> FETCH q_cursor INTO x,y,z
> END WHILE
>
> CLOSE q_cursor
>
> The second call of the function gives the following result when opening the
> cursor (all calls are running within one transaction):
> -270: Cannot position within temporary table
> -101: File is not open> What's happening ??
I may be wrong, but are you creating a temporary table somewhere else
within your program. If this is the case then change the create command
to read
create temp table ??????
(
??? ??
) WITH NO LOG
The WITH NO LOG is the important command, there is a known bug in Informix
concerning creating temporary tables when using transaction processing.
If this does not solve the problem, then I'm sorry. But the WITH NO LOG
command should always be using with temporary tables anyway.
Good Luck,
--
Paul Eccleston