Re: Forms 6.0 error with Ora-01001

From: Matt B. <mcb_at_fightspam.sd.znet.com>
Date: Sat, 11 Nov 2000 09:24:45 -0800
Message-ID: <t0r3ukmmp9rj06_at_corp.supernews.com>


<rmhoy_at_my-deja.com> wrote in message news:8uhirf$gdv$1_at_nnrp1.deja.com...
> Hello all,
>
> I'm answering to my post. After adding lots of print statements,
> I discovered that if you close the cursor twice, you get the
> Oracle error: ora-01001. It's can be reproduced easily to get
> this error problem. I wonder if it is a known bug problem??
>
> open test_cursor;
> fetch test_cursor into t1;
> close test_cursor;
> close test_cursor; -- this will give you the ora-01001

Not a bug - this is how PL/SQL works. Once you close a cursor, you can't close it again. Only close it once.

If you are having a problem with the cursor staying open and not closing or if your code is so complicated that you can't tell where processing is going and you're attempting to close it too often, try this:

IF test_cursor%ISOPEN THEN

   close test_cursor;
END IF; That way it'll only be closed if it's open to begin with.

-Matt Received on Sat Nov 11 2000 - 18:24:45 CET

Original text of this message