bind variables 8i/9i
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: bind variables 8i/9i

  1. #1
    Join Date
    Feb 2001
    Location
    Master Control
    Posts
    86

    bind variables 8i/9i

    i have seen pl/sql code implement bind variables differently in 9i than in 8i. is pl/sql code written for 8i not valid with 9i? anyone have any docs?

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Can you give us an examle? Or at least some kind of hint of what you are talking about....
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  3. #3
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    Originally posted by jmodic
    Or at least some kind of hint of what you are talking about....
    ( -- supereb response )
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  4. #4
    Join Date
    Feb 2001
    Location
    Master Control
    Posts
    86
    yea, "superb indeed"...yea, thanks for bashing me when i don't understand something...really cool.

    here is an example of how i have seen them in 8i. will this work on 9i or does any code need to be changed:

    v_cursor := dbms_sql.open_cursor;
    dbms_sql.parse(v_cursor, 'select something from table where field = :BV', DBMS_SQL.V7);
    dbms_sql.bind_variable(v_cursor, ':BV', p_var);
    dbms_sql.define_column_char(v_cursor, 1, v_var, 9);

    v_rows := dbms_sql.execute(v_cursor);

    LOOP
    IF dbms_sql.fetch_rows(v_cursor) = 0 THEN
    EXIT;
    END IF;
    dbms_sql.column_value_char(v_cursor, 1, v_var);
    END LOOP;

    dbms_sql.close_cursor(v_cursor);

  5. #5
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253

    Re: bind variables 8i/9i

    Originally posted by tron
    anyone have any docs?
    http://tahiti.oracle.com
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  6. #6
    Join Date
    Mar 2001
    Location
    Reading, U.K
    Posts
    598
    will this work on 9i or does any code need to be changed

    YES. There is a substitute/enhanced version for "dbms_sql" called EXECUTE IMMEDIATE. Check doc for further info.
    Cheers!
    OraKid.

Posting Permissions

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


Click Here to Expand Forum to Full Width