Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2007
    Posts
    1

    Unanswered: procedures and PLS-00049 error

    I have been trying to create a procedure to show age in a forms application
    I have added an AGE and BIRTHDATE item each in the MEMBERS and CUSTOMERS Datablocks, and when I write the code and compile it, I continue to receive a PLS-00049 error. Here is my code:

    PROCEDURE calculate_age
    IS
    AgeValue NUMBER(3);
    AgeItem VARCHAR2(75);
    AgeItemID ITEM;
    BdateItem VARCHAR2(75);
    BdateItemID ITEM;
    BdateDate VARCHAR2(20);

    BEGIN

    AgeItem := YSTEM.CURSOR_BLOCK ||'.'||'age';
    AgeItemID := FIND_ITEM (AgeItem):

    BdateItem := YSTEM.CURSOR_BLOCK ||'.'||'birthdate';
    BdateItemID :=FIND_ITEM (BdateItem);

    IF ID_NULL (AgeItemID)
    OR ID_NULL (BdateItemID) THEN
    message ('No AGE or BIRTHDATE item in block, unable to calculate age');
    ELSE
    BdateDate := NAME_IN (BdateItem);
    AgeValue := TRUNC(MONTHS_BETWEEN(SYSDATE, TO_DATE(BdateDate,
    'DD-MON-YYYY'))/12, 0);

    COPY (TO_CHAR(AgeValue), AgeItem);

    END IF:

    END;

    The error appears at the YSTEM.CURSOR_BLOCK line for both AGE and BIRTHDATE. Can you show me what I am doing wrong?

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >Can you show me what I am doing wrong?
    Please provide me a URL which documents the data type "ITEM".

    Please read & follow the #1 STICKY post at the top of this forum.
    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.

  3. #3
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    You can't use :system.CURSOR_BLOCK like that. Do the following


    AgeItem :=name_in( YSTEM.CURSOR_BLOCK ||'.age');
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

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