RE: Strange error with Codexpert
"Reed, David A." <[email protected]>
| Newsgroups | gmane.comp.db.oracle.toad.free |
|---|---|
| Message-ID | <[email protected]> |
I don't think it is so strange. Why would you check for an open cursor and then try to open it again?
-----Original Message-----
From: {Toad for Oracle} on behalf of {Manuel C.} [mailto:[email protected]]
Sent: Thursday, December 08, 2011 7:00 AM
To: Reed, David A.
Subject: Strange error with Codexpert
Forum: Toad Commercial Discussion
Hi,
I am checking some legacy packages with Codexpert, and experiencing a strange behaviour.
I have a package like this ():
cursor c1 (cur_name sometables%Type) is
select something from sometable where somefileds = cur_name;
procedure someprocedure (name IN sometable%TYPE,......);
begin
if c1%ISOPEN then
open c1 (name);
end if;
out_batch_size := 0;
for myint in 1..batch_size
LOOP
fetch c1 into Value_table(myint);
out_batch_size := out_batch_size + 1;
EXIT WHEN c1%NOTFOUND;
END LOOP;
status := 0;
close c1;
When I have those first three lines (which looks fine to me, open the cursors only if it is not yet open) the codexpert gives me back 2 errors "Ensure that any local cursors you are referencing have actually been opened" with the line "if c1%ISOPEN then". And later a "Confirm that the cursor you are referencing has been opened" on all other lines with c1.
if I change this:
if c1%ISOPEN then
open c1 (name);
end if;
to
open c1 (name);
then it is fine.
Someone has a suggestion?!?!?
manuel
-----------------------------------------------------
Original Message
Hi,I am checking some legacy packages with Codexpert, and experiencing a strange behaviour.I have a package like this ():cursor c1 (cur_name sometables%Type) is select something from sometable where somefileds = cur_name;procedure someprocedure (name IN sometable%TYPE,......); begin if c1%ISOPEN then open c1 (name); end if; out_batch_size := 0; for myint in 1..batch_size LOOP fetch c1 into Value_table(myint); out_batch_size := out_batch_size + 1; EXIT WHEN c1%NOTFOUND; END LOOP; status := 0; close c1;When I have those first three lines (which looks fine to me, open the cursors only if it is not yet open) the codexpert gives me back 2 errors "Ensure that any local cursors you are referencing have actually been opened" with t
he line "if c1%ISOPEN then". And later a "Confirm that the cursor you are referencing has been opened" on all other lines with c1.if I change this: if c1%ISOPEN then open c1 (name); end if;to open c1 (name);then it is fine.Someone has a suggestion?!?!?manuel
Historical Posts for this Thread:
-----------------------------------------------------
To reply, simply reply, or go to <http://toadfororacle.com/thread.jspa?messageID=131089> to be taken to the message.
[1qdqfa-5WL-y6l]--end--
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/toad/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/toad/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/