Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004
    Location
    Pune, India
    Posts
    15

    Unanswered: Using Cursor Attributes in Pro*C program(.pc file)

    hi,

    Does anyone know, what is hte equivalent of following PLSQL code in PRO*C??

    declare
    cursor c1 as select * from emp;
    begin
    if c1%isopen then
    close c1;

    else
    open c1;
    end;
    /

    I m able to get the cursor working succefully as such. But before my procedure opens it, i want to check whether it has been left open by the loop or whatever...

    So what is the equivalent of "if c1%isopen....." in Pro*C??

    I am able to get hte paramterized cursor workign as given in the book - Guide to ORacle Precompilers . But that does not mention anything about Cursor attributes usage in the Pro*C code.
    Pls help...

    thanks
    regards
    Abhivyakti

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Look in $ORACLE_HOME/precomp/demo/proc for code examples.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •