Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Location
    Tejas
    Posts
    3

    Unanswered: Oracle9i - Custom trigger to Create new record?

    Hi, I am trying to create a button for a custom form to Insert a new record into table. Needs to increase table id by 1 and the allow to update table. Im using the code below for the Create button:

    -- Insert new record into SKILL table
    CLEAR_FORM;
    SELECT skill_id_sequence.nextval
    INTO :skills_block.skill_id
    FROM dual;

    I get this error:
    Error 201 at line 3, column 8 identifier 'SKILL_ID_SEQUENCE.NEXTVAL' must be declared


    Checked online and it said either not connected to DB or invalid field but checked both and they look ok. Any suggestions? Thanks!

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Oracle9i - Custom trigger to Create new record?

    If the user running the form is not the owner of that sequence, then
    a) he needs to be granted SELECT access on it
    b) either the current schema must be set to the owner, or there must exist a synonym for the sequence accessible to the user; otherwise it would have to be referenced as owner.skill_id_sequence.nextval

  3. #3
    Join Date
    Sep 2003
    Location
    Tejas
    Posts
    3
    Forgot to declare the sequence in pl/sql before hand. Working now...Thanks!

Posting Permissions

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