Re: Cursor Problem
Posted in 1993
Topics: General Discussion
In article <2cqrcdINNe3b@emory.mathcs.emory.edu> mark@datapro.elite.com writes: >Can anyone help with this problem? > >We have a simple SQL math routine that enters the CASE statement (below). > After >3 or 4 passes it returns a message, either COMMAND POINTER IS NULL or >INVALID MESSAGE TYPE. > >The FREE statement does not work. >The Informix is 5.0 on SCO, but 4.1 works! This is the relevant code: > > > WHEN 3 > OPEN cur_c3 > WHENEVER ERROR CONTINUE > FETCH cur_c3 INTO xcol > IF status<0 THEN > LET xcol = 0 > END IF > WHENEVER ERROR STOP > CLOSE cur_c3 > >Thanks - > >Mark Goldin > >-- >Elite Data Processing, Inc (elite.com) Ph: 310-398-4900 Fax: 310-398-4966 > If you use the CASE construct with the expression on the CASE statement there is a tendency for Informix to run out of temporary string storage and cause all sorts of problems. You might try placing the expressions on the WHEN part. This may help your problem, then again it might not! i.e. change CASE Expr WHEN 3 ... END CASE to CASE WHEN Expr = 3 ... END CASE -- +-----------------------------------+---------------------------------+ | Malcolm McLean | mmclean@ipaedin.demon.co.uk | | Image Partnering Associates Ltd | 100025,1543@compuserve.com | | 4 Dalgety Avenue | |\\___/| | | Edinburgh | (_O O_) | | EH7 5UE Voice 031-661 9180 | /(V)\\ | +-----------------------------------+---------------------------------+