2 Replies Latest reply: Aug 4, 2012 6:33 PM by Navaneetha Krishnan Nataraj RSS

    Applying DB seq in ADF...

    HKrievs
      In the book "Quick start guide to Oracle Fusion Development" - two methods for applaying a DB sequence are described.

      1) - this methods gives me a JBO-25030

      import  oracle.jbo.server.SequenceImpl.

      +protected Number nextVal(String sequenceName) {+
      SequenceImpl s = new SequenceImpl(sequenceName, getDBTransaction());
      return s.getSequenceNumber();
      +}+


      +protected void create(AttributeList attributeList) {+
      super.create(attributeList);
      setYourAttribute(nextVal("YourSequenceNameInDataBase"));
      +}+

      2) this methods gives me a JBO-29000
      Edit Attribute dialog for YourAttribute, set Value
      Type to “Expression” and enter “adf.object.nextVal("YourSequenceNameInDataBase");”

      Needles to say that the sequence exists with synonym and all. Same error when using the sequence from the HR-schema.

      Using Jdev 11.1.1.6

      Any advice (besides using another approach - like a db trigger)

      Thanks......