Re: Strange error with Codexpert

"Manuel C." <[email protected]>
Newsgroups gmane.comp.db.oracle.toad.free
Message-ID <12435385.1669321323351275046.JavaMail.SYSTEM@alvqcfw02>
 Message from: Manuel C.

Sorry,
there was a copy past error.
The code is like this

if NOT c1%ISOPEN then
open c1 (name);
end if;

_______________________________________

Historical Messages 


Author: Manuel C.
Date: Thu Dec 08 05:34:04 PST 2011
Sorry,
there was a copy past error.
The code is like this

if NOT c1%ISOPEN then
open c1 (name);
end if;
__

Author: Manuel C.
Date: Thu Dec 08 03:57:56 PST 2011
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
__
_______________________________________
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.