Auto_increment issue faced with primary key

create table test(
snum int not null auto_increment,
course_id varchar(15),
primary key(course_id, snum))
create table testt(
course_id varchar(15),
pre_id varchar(15),
foreign key (course_id) references test(course_id),
foreign key (pre_id) references test(course_id))
the above two table test has a primary key (snum, course_id) . course_id, which is being referenced in below table testt as a foreign key.
i have an issue when trying to create a table test wit primary key (course_id, snum) that Error code 1075, SQL state 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key. but when place primary key(snum, course_id) it's working in this case i wasn't able to use course_id as foreign key for below table testt.
could you please suggest me how to resolve this issue.

The description of this forum is "Discussion of Oracle SQL and PL/SQL issues "
MySQL Forums are at http://forums.mysql.com/
Hemant K Chitale
Edited by: Hemant K Chitale on Jan 11, 2011 2:56 PM

Similar Messages

  • Another user has changed the row with primary key -Table changed externally

    Hello,
    I am facing the error: "Another user has changed the row with primary key oracle.jbo.Key[94 ]." during the delete operation.
    User case scenario:
    1. Added new row in the table.
    2. Once new row is added to the the table, another application will update few columns in the newly added row based on some logic.
    3. On the same session I am trying to delete the newly added row and getting above mentioned error.
    I have added a "Button" in the table to partialRefresh the table to check the new values of the changed columns.
    I have checked the forum and found many similar errors and tried the following but nothing helped.
    1. By setting "Auto Refresh = True" for the view object.
    Issue faced-> It worked fine but after few add and remove my db is getting to inconsistent state after which, I am not able to do any add/delete from my page.
    Error: "Too many objects match the primary key oracle.jbo.Key". I have checked this and I am not getting this error when "Auto Refresh = False" even after multiple add and remove actions.
    2. By Setting "Auto Refresh" the iterator associated with the page.
    Issue -> Did not work at all.
    Looking forward inputs from gurus.
    Thanks
    Abhijeet

    Finally I found one solution to this problem at: [ http://www.avromroyfaderman.com/2008/05/bring-back-the-hobgoblin-dealing-with-rowinconsistentexception/|http://www.avromroyfaderman.com/2008/05/bring-back-the-hobgoblin-dealing-with-rowinconsistentexception/]
    Simply overriding the lock() method in the entity object resolved issue. Kudos to the author.
    Code:
    public void lock() {
    try {
    super.lock();
    } catch (RowInconsistentException e) {
    refresh(REFRESH_WITH_DB_ONLY_IF_UNCHANGED | REFRESH_CONTAINEES);
    super.lock();
    But, Now my refresh button is not working as depend on the "Auto Refresh = True" to update the table.
    Can anyone tell me how can I refresh the VO of my table from the button.
    Thanks
    Abhijeet.
    P.S: I have already added the partial trigger but it is work not working as the data is cached in the VO. Removing the Cached property for the VO is creating other problems.

  • WLS8.1sp4 running into Bean with primary key

    We're facing an interesting issue with WLS8.1sp4.
    We have upgraded from WLS6.1sp5 to WLS8.1sp4, while testing running into the following error.
    javax.ejb.NoSuchObjectLocalException: [EJB:010140]Bean with primary key: '5375758' not found.: javax.ejb.NoSuchEntityException: [EJB:010140]Bean with primary key: '5375758' not found.
    at weblogic.ejb20.manager.BaseEntityManager.checkForReentrant(BaseEntityManager.java:1460)
    at weblogic.ejb20.manager.DBManager.preInvoke(DBManager.java:251)
    at weblogic.ejb20.internal.BaseEJBLocalObject.preInvoke(BaseEJBLocalObject.java:228)
    at weblogic.ejb20.internal.EntityEJBLocalObject.preInvoke(EntityEJBLocalObject.java:72)
    at edu.harvard.gmas.budget.SegmentLineItemBean_uyzy57_ELOImpl.getSubagreement(SegmentLineItemBean_uyzy57_ELOImpl.java:138)
    at edu.harvard.gmas.budget.SegmentCategoryManager.entityToSegmentLineItemData(SegmentCategoryManager.java:1610)
    at edu.harvard.gmas.budget.SegmentCategoryManager.entityToSegmentCategoryData(SegmentCategoryManager.java:1494)
    at edu.harvard.gmas.budget.SegmentCategoryManager.fetchSegmentCategoryData(SegmentCategoryManager.java:2833)
    at edu.harvard.gmas.budget.CategoryBudgetManager.fetchCategoryBudgetDataForProposedBudget(CategoryBudgetManager.java:2882)
    at edu.harvard.gmas.budget.BudgetMediatorBean.recalculateAndUpdateCategoryAmountsForProposedBudget(BudgetMediatorBean.java:6855)?:|?:|

    The code is already there with JDBC call inserting
    into the table, the inserting trigger then will generate
    sequence key and being inserted into primary key column.
    Now wondering if it's possible to change the code to use entity bean but without modifying the trigger (since it contains other business logics).

  • JBO-25014: Another user has changed the row with primary key oracle.jbo.Key

    Hi,
    I am developing a Fusion Web Application using Jdeveloper 11.1.2.1.0. I have a home.jspx page that has a ADF table built on efttBilling View Object. . When you click on one of the rows in the table, it will take you to detail.jspx where you can edit the row and save. When 'save' is clicked, stored procedures are executed to update/insert rows into few tables , and then go back to home.jspx where you need to see updated content for that row.
    To get down to the exact issue, updates are made to the tables on which the efttBilling View Object is built using a stored procedure. Once this is done, I am trying to requery view object to see new content. But I keep getting JBO-25014: Another user has changed the row with primary key oracle.jbo.Key error. Following are the approaches I followed to query new results:
    a. Executed Application Modules Commit Method. Created 'Commit' Action binding and tied it to homePageDef.xml. Called this binding from a view scope bean.
        BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
         OperationBinding operationBinding = bindings.getOperationBinding("Commit");
        Object result = operationBinding.execute();
       if (!operationBinding.getErrors().isEmpty())
        return null;
    b. Marked 'Refresh on Insert' , 'Refresh on Update', 'Change Indicator' checkboxes for all the attributes in the entities associated with efttBilling View Object.
    c. Tried to Requery View Object. Created a refreshViewObject method in Application Module Impl.java file, exposed this method to the client interface and created a invokeMethod Action binding in home.jspx
    Code in Application Module:
      public void refresheftTransactionsforBillingAccountViewObj1View()
        System.out.println("In eftTransactionsforBillingAccountViewObj1");
      findViewObject("eftTransactionsforBillingAccountViewObj1").executeQuery();
    Code in view scope bean
            DCBindingContainer bindings =
           (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
            OperationBinding operation =
            bindings.getOperationBinding("refresheftTransactionsforBillingAccountViewObj1View");
            operation.execute();
    I have searched web, ADF forums and tried methods suggested in there but no sucess.
    Could anyone please provide some insight in this issue. I have been battling with this since quite some time. I can provide you with the log file too.
    Thanks!
    Shai.

    What code does your Commit method have .. can you try using the Commit executable from the AM itself instead ?
    Also -
    Shai wrote:
    'Change Indicator' checkboxes for all the attributes in the entities associated with efttBilling View Object.
    which all attributes you set this property for . it should just be for History columns as such.
    Did you also check if this could be your scenario ?
    Decompiling ADF Binaries: Yet another reason for "JBO-25014: Another user has changed the row with primary key orac…
    OR
    JBO-25014: Another user has changed the row with primary key oracle.jbo.Key
    OR
    Another user has changed the row with primary key -Table changed externally
    Message was edited by: SudiptoDesmukh

  • Insert row with datapages/bc4j  problem with primary key

    Hi everybody,
    i tryed to insert a new row into a table with primary key (id) and therfore used a datapage, where there is a html-form and the data tag set attribute to get the data into the BC.
    I also want to use a sequence for the primary key and made a trigger to insert the key-value before insert. but in this case it doesnt work. I also tryed to get the sequence to the BC -Layer (so that i can set the PK in the View OBJ already) with a View Object but I dont know how.
    so what schould i do??
    thanxx
    Martin

    There's a know issue, when creating a record with blob, the blob content won't show until committing. The blob is added too late, which means you're in trouble with not-null fields...
    Sue, is this logged as a bug? And the dialog captions?
    K.

  • Another user has changed the row with primary key oracle.jbo.Key

    Oracle Jdeveloper 11.1.2.1
    ADFbc + JSF
    I have a Page ( Purchase Order Status) (which show all PO to be approved) from this page (page1) the Supervison can call Regular PO (Page2) and change whatever he needs to change. (products, quantities, discounts,warehouse...)
    then on Page2 he invoke (commit) after his changes and return to page1, when supervisor change the status to Approved on page1. I get this Error (Another user has changed the row with primary key oracle.jbo.Key[#]).
    for sure there are no another user changing this PO.
    both page are based on same Entity Object (PO) , how can I solve this Issue? thank you

    hi,
    This occur due to pessimistic locking mode for ApplicationModule ,alter to optimistic and check following sample to get knowledge about locking mode.
    http://andrejusb.blogspot.com/2010/03/optimistic-and-pessimistic-locking-in.html-Suersh

  • Fast refresh snapshots with primary key deferrable

    Oracle version 8.1.7 standard
    I've created this sample schema:
    Tables:
    create table a_customer
    (c_id integer primary key deferrable,
    zip integer
    create table a_orders
    (o_id integer primary key deferrable,
    c_id integer,
    constraint o_c foreign key (c_id)
    references a_customer(c_id)
    create index c_ind on a_orders(c_id);
    create table a_order_line
    (ol_id integer primary key deferrable,
    o_id integer,
    constraint ol_o foreign key(o_id)
    references a_orders(o_id)
    Snapshot logs:
    create snapshot log on a_customer with primary key (zip);
    create snapshot log on a_orders with primary key (c_id);
    create snapshot log on a_order_line with primary key (o_id);
    When I create the snapshot from another instance:
    create snapshot orders_snap refresh fast as
    select * from a_orders@dblink o where exists
    (select c_id from a_customer@dblink c where
    o.c_id = c.c_id and zip = 19555);
    It return me the error ORA-12015.
    If I recreate the primary keys without "deferrable" option, the snapshot is created succesfully.
    Is it a bug of the Oracle version used?

    Why will someone update the PK of a table. This itself violates the basic design of any application. A PK on a customer ID or a social security no of a person will never get updated in a life time of a user. In case a new number needs to be issued then the correct sequence is to delete the existing record and create new one rather then updating the existing record.
    So you jsut need to check the logic with deleting the PK and then refreshing the Mviews. Please do not update the PK that will itself be a flaw in application design as far my experience is concerend with the PK.
    Amar

  • Mapping in OWB with primary key and foreign key relationship

    Hi all,
    I am new to this datawarehousing field. I have just started my career. I have to now create a mapping in owb where a table has a field which is a primary key of another table in the same staging area. If you guys could help me out with the a method it can be created that would be very helpful to me.
    I thought of 2 ideas,
    1. If I can use a look up, but then I am not sure if i can use a lookup for primary key, foreign key relationship. If I can use also, I do not know how to use that.
    2. What if I can directly take that the first table and link the primary key of that table to the second table which uses that primary key of the first table as one of its fields.
    I do not know how feasible these methods are. Please guys help me out.
    Thanks in advance.

    I have a similar case where table a and table b having relation but table a got inserted with data and table b is empty so there no values for foriegn key column in table b to realte with table a.
    Now i want to load table b foriegn key with primary key column values of table a.
    how can we do this in owb
    thanks
    kumar

  • JBO-25014: Another user has changed the row with primary key...

    Hello,
    could you help me please with resolving this error "JBO-25014: Another user has changed the row with primary key..." - I am just getting a row from a view by bind "filter" variable, then I am assigning new values for some of the attributes - and trying to commit ..unsuccessfully..
    View is based on Entity.
    I saw directive for setting Entity's attributes as "update after insert / update" - but this did not help me.
    Thanks in advance.

    Hi
    Please try this solutions:
    One solution is to change the ADF BC locking behavior to optimistic instead of pessimistic. Choose the AM and click the Configuration context menu option. Select the LocalAM entry and go to the Properties. Scroll down to the locking setting and change the existing entry
    If there is a trigger changing values, you need to mark those attributes (the ones that may be changed) as refresh after insert and/or refresh after update in your Entity Object.

  • Error on commit: Another user has changed the row with primary key : Rec_10

    i am using jdev 11g R2
    i implemented a master form and two detail tables on a jspx page
    added createInsert, commit and rollback buttons
    actions from these buttons all are executed from a bean
    for entity attributes: refresh after insert and update are marked as checked
    i am using login page for authorizing the user by getting the user information from user table
    and then using the userid i am applying the setVisible property on some components at bean code
    when i am inserting a new row there is no problem, here i am generating the new id like 'Rec_10', using a database sequence
    but when i am trying to update a current record, it is showing the error --> Error on commit: JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[Rec_22 ]
    on clicking the commit button and also it is not updating the record on database
    Thanx in Advance
    kumar
    Edited by: user10922309 on Nov 18, 2009 3:25 AM
    Edited by: user10922309 on Nov 18, 2009 4:28 AM

    Hi John
    thnq for your quick responce.
    here are the attribute details:
    Attribute Name: RecID, Type: String, Value Type: Expression, Value: 'Rec_' + (new oracle.jbo.server.SequenceImpl("Rec_SEQ_AN", object.getDBTransaction())).getSequenceNumber()
    Updatable: While New and Primary Key, Queryable, Persistent, Mandatory, Refresh After: Update, Refresh After: Update and Insert are markded as checked
    error details:
    oracle.jbo.RowInconsistentException: JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[APP_22 ].
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:1062)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:548)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:7762)
         at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:5554)
         at oracle.jbo.server.EntityImpl.beforePost(EntityImpl.java:6057)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6229)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3127)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2935)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1991)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2233)
         at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1580)
         at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1404)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1289)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2120)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:693)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:217)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:201)
    --> at Index.saveApplicationAll(Index.java:6246)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1245)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:673)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:273)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:165)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:54)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:96)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.wls.util.JpsWlsUtil.runJaasMode(JpsWlsUtil.java:146)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:140)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    --> on click commit button Index.saveApplicationAll method will invoked.
    Thats it.
    Kumar
    Edited by: user10922309 on Nov 18, 2009 4:32 AM

  • Javax.ejb.ObjectNotFoundException: Bean with primary key '555' was not foun

    When I delete a particular entity bean instance, i get the following exception:
    javax.ejb.ObjectNotFoundException: Bean with primary key '555' was not found by 'findByPrimaryKey'.
    But, the instance is being deleted from the database.
    Anyone please help,
    Thank u,
    Seshu

    Greetings,
    When I delete a particular entity bean instance, i get
    the following exception:
    javax.ejb.ObjectNotFoundException: Bean with primary
    key '555' was not found by 'findByPrimaryKey'.Interesting. How is your client calling the bean's remove method? Directly or through its home? Is it calling findByPrimaryKey before or after the call to remove? What is the PrimaryKey class type of your bean? Is the client passing a correct instance? All are things to be considered when troubleshooting your application. If more assistance is required, then seeing the relevant source code would be more helpful.
    But, the instance is being deleted from the database.As is generally to be expected. No?
    Anyone please help,
    Thank u,
    SeshuRegards,
    Tony "Vee Schade" Cook

  • Another user has changed the row with primary key exception

    Hi Experts,
    I have a method in AmImpl.java. I am calling this method from my bean. The method opens a JDBC connection(i know it is not a good approach, we should use AM instance, but this was the last option as had tried all) and updates a table in the database. I want the data to be refreshed on screen after update is performed. So, I am doing VO.executeQuery() after i commit the data in the database and that is when i get the exception "Another user has changed the row with primary key exception".
    Can you please tell me how to get rid of this error or any other way of doing the above process?

    I have a screen divided into two parts, i have used a Panel splitter for that. Each pane has a table. Say i edit a record in table 1 and on the basis of changing a flag, the record should move out of table 1 and should go to table 2 in the second pane. the records in table 1 have some priorities defined by the end user, so if a record moves out or is reordered within that table, the rest of the records' priority number also changes. I have achieved all this. Now, when I apply a filter on the table, the record set gets filtered and contains limited set of rows. Now, when i try to achieve the two processes i have mentioned above (moving out or reordering), I need to have a control over the entire rowset because i need to alter the priority numbers accordingly but the VO iterator contains only the filtered set of rows even if I do VO.executeQuery. I was not able to get the entire rowset, so thats when i decided to use JDBC and i am able to successfully update the database. Then after the update, i need to refresh the table on the screen, so I did Vo.executeQuery in the bean after the method was called and I encountered this error. Then, I removed this Vo refresh from the bean and did this.getVO.executeQuery in the AmImpl method, after i commit changes in the database, it was working fine for few days but now it has started flashing the exception "Another user has changed the row with primary key exception".

  • Updateable columns with primary key

    Hi,
    I use HTML DB 2.0 and 10g R1.
    With HTML DB i would like create an application with 2 pages.
    The first page is an report from a table with 2 columns, the first column is datatype number(10) with primary key and the second column is varchar2(255).
    The report should looks like with an edit-icon for all rows and both columns with header.
    My problem is, the report has only 2 columns, not 3 columns and the edit-icon is together with the first table column, the header name is Edit.
    What can I do ?
    The second page should be a form linked from the first page for update, insert and delete rows. It's not possible to use a sequence on column with pk for new inserts.
    I don't know, which sample application has the same content or what I have to do.
    Who can help me ?

    Simply create an application "Report and Form" based on your table and modify it as follows:
    - On the report page, modify the query to include the PK column a second time (using an alias)... if this was based on the EMP table with EMPNO being the PK, the query then looks like this (modification bold):
    select
    "EMPNO",
    "EMPNO" as "EMPPLOYEE NUMBER",
    "ENAME",
    "JOB",
    "MGR",
    "HIREDATE",
    "SAL",
    "COMM",
    "DEPTNO"
    from "EMP"
    where
    instr(upper("ENAME"),upper(nvl(:P1_REPORT_SEARCH,"ENAME"))) > 0 or
    instr(upper("JOB"),upper(nvl(:P1_REPORT_SEARCH,"JOB"))) > 0
    - In the report attributes, move the added column to the desired position (I moved it directly next to the edit link).
    - On the Form page, just change the item holding your PK column from "hidden" to "Text field".
    You may take a look at http://htmldb.oracle.com/pls/otn/f?p=PK_VISIBLE:1 to verify this is what you're looking for.
    Edit: Oops - I just recognized I cannot update the EMPNO on page 2 since the automated row processing depends on an unchanged PK. However - normally it isn't a good idea to update a PK anyway (since it might be used as FK in some other table(s)).
    It is possible to create new records with manually adding the new PK, so if this is really all you need, then I would suggest you modify your edit page displaying the PK column read-only when editing an existing row and updatable when adding a new record (using 2 items with conditional display, based on the PK being NULL or NOT NULL).
    Holger
    Message was edited by:
    schweich

  • Another user has changed the row with primary key oracle.jbo.Key   HELP

    I created VO which based on two entities. Then user search from that VO, when result comes update two row of each entity .
    HERE my function
    public String lockPayment() {
    getAppImpl().getcheckPaymentsVO1().setRangeSize(-1);
    Row[] rw2 = getAppImpl().getcheckPaymentsVO1().getAllRowsInRange();
    checkPaymentsVORowImpl tparow;
    tparow = null;
    for (int j = 0; j < rw2.length; j++) {
    tparow = (checkPaymentsVORowImpl)rw2[j];
    // tparow.setApayLock("1");
    tparow.setAtaxLock("1");
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("Commit");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    return null;
    When I click it gives me error:
    ----------> Another user has changed the row with primary key oracle.jbo.Key
    Any suggestion !!!!!!
    Edited by: 903927 on Dec 14, 2012 1:00 AM

    Hi,
    see this: https://blogs.oracle.com/onesizedoesntfitall/entry/the_case_of_the_phantom
    Frank

  • Issues faced with XML (Objt-Rel) - Plan to move to Binary XML (schema-less)

    Hi All,
    Our Production DB has Oracle XMLDB implementation using 9 XMLDB Object-Relational
    Tables. These have been implemented almost since a year, and we faced several issues,
    have listed some of the most important ones:
    Obviously it is Object-Relational implementation, so we have 4-5 XSDs to start with that
    support the Object-Relational schema
    1) copyEvolve Issues : Due to changing Business Requirements constantly, we had to constantly
    and continuously modify/upgrade XSDs and then use "copyEvolve" to apply new XSDs
    Encountered several issues with CopyEvolve
    2) "Home-grown" solution to evolve XSD/Schema:
    We came up with our own Solution to migrate/evolve XSD schema.
    a) Backup all data from 9 XML DB Tables to 9 CLOB Tables (data is thus "dereferenced" and "delinked"
    from underlying XSDs
    b) Since data is backed up to CLOB Tables, go ahead and drop the entire schema and register
    new XSDs and recreate Tables. (GRANTS and PUBLIC SYNONYMS reappled, needless to say)
    c) Reload data from backed up CLOB Tables to newly created XMLDB (Obj-Relational) Tables
    Above approach (without "copyEvolve") has worked fine so far and helped in each Release/ every migration
    With our data sets becoming increasingly huge, downtime is not sufficient to follow this successful, home-grown
    approach and as a result we would like to get away from Object-Relational XMLDB Tables altogether.
    3) Our Application currently uses XPath heavily on all 9 XMLDB Tables and we understand XPath is already
    deprecated by Oracle (as of 11.2.0.2)
    We are seriously considering doing the following:
    1) Migrate all 9 XMLDB Tables and modify underlying Storage from "Object-Relational" to Binary XML (Schema-less)
    2) Modify Appln code with all XPath replaced by corresponding XQuery constructs
    3) Replace existing "B-TREE" based Indexes in Object-Relational XMLDB Tables with either a) Indexes on Virtual DB Columns to enforce Primary Key and Unique Constraints and b) XMLIndex on all other Non-Unique Columns instead of
    the corresponding "B-TREE" based Indexes
    What we hope to achieve with the above:
    1) Eliminate XSD Usage completely (and copyEvolve nightmares thereby)
    2) Eliminate Usage of XPath totally
    3) Better Performance overall :-)
    Would like to get some advice and feedback on our Proposed Plan and mainly are we taking the
    right direction especially in respect of Performance, Point 3) listed above
    Any feedback or tips would be truly appreciated
    Regards and Thanks
    Auro

    WRT to XPATH Vs XQuery.
    1. XPATH is a subset of XQuery.. Any XPATH expression is, by definition, an example of simple XQuery expression, so XPATH is not depricated.
    2. What we are depricateing are the older, oracle specific XML operators (EXTRACT(), EXTRACTVALUE(), EXISTSNODE()), that ONLY support XPATH. We are depricating these in favour of the new SQL/XML operators (XMLTABLE, XMLQUERY, XMLEXISTS) defined by the SQL standards committee. These operators provide support for the full XQquery standard, and implicitly all of the XPATH expressions that were supported by the older operators. This menas we strongly recommned that new code, developed to work with 11g make use of nrw newer operators. Personally I cannot see a point where we would ever consider de-supportting the older operators, we are well aware of how much code makes use of them.
    What this means is that any code that is written using the older operators will continue to work, unmodified. However should a bug surface in the use of the older operators, we would strongly recommend that the code in question be migrated to the new operators as part of the remidiation process.
    Also, once the initial pain of learning the new syntax is overcome, I truely believe that the new operators result in much more efficient and mantainable code, so taking the time to do code renevation when possible will probably pay off in the long term...
    WRT to moving away from Schema-Based OR storage, I would look at the kind of changes you have made to the XML Schema. If they are the kind of changes that would be supported by in-place evolution in 11g then you might want to re-consider this. If, on the other hand you are regularly making changes to the XML schema that are not backwardsly compatable with your older XML Schema then Schema-Based binary XML storeage (which is more flexible than Schema-Based Object-Relational storage) or even non-schema based Binary XML may be a better choice for your applicaiton..
    I would experment by registering the oldest version of your XML Schema in 11gR2, and then testing each of the evolutions you have gone through to see if 11GR2 inplace evolution would have managed them. Also, ask yourself do you expect your XML Schema to keep changing so drastically moving forward, or were some of these changes the results of the growing pains associated with learning how to use XML schema effectively. BTW the approach you outline is effectively what CopyEvolve is doing under the covers...
    Bear in mind that for the use-cases Object-Relational storage addesses, when all of the XPATH expressions are correctly re-written into SQL operations on the underlying tables, and where the majority of queries end up accessing or updating leaf-level nodes in the XML, it is unlikely that a Binary XML / Unstructured XML Index combination will deliver similar performance. If you are only accesss a small subset of the leaf-level nodes, creating structured XML Indexes that project out the nodes in question may be able to deliver similar performance to an Object-Relational storage model, but you will need to get the index definitions correct.
    -Mark
    Edited by: mdrake on Mar 7, 2011 7:40 PM

Maybe you are looking for

  • How to create a view in sql workshop depending on an application item value

    Hello, How coud I create a view in SQL worshop based on an application item value? For example select id, name from gg_provider where user = ' || :USER So basically each user would have it's own view. But it does not work like that. I think when I us

  • Problem in creating small box in sap script

    Hi, I am working on a sap script in which iwant to create a small on the right hand side of the footer of the script and also want to display the data in that box. plzzz provide me guidelines how to solve this problem.

  • NOKIA N 80 FIRMWARE VERSION

    Hi, can any1 advise if the following is the up to date version thanks V 3.0614.0.3 11-04-2006 RM-92 NOKIA N80 (58.01) above got by *#0000# for those wishing to check theres

  • Auto Complete Text

    How do I turn off the auto complete in texting?  It is a nuisance.  Thanks. 

  • Agent installation

    OS: AIX 5.2 Oracle DB Version: 10.1.0.4.0 CD Pack: Oracle EM 10g Grid Control Release 1 Hello All, Our Oracle DB 10.1.0.4.0 is running on AIX 5.2. Now I have request to install AGENT on this box from Oracle EM 10g Grid Control Release 1 cd pack. Is t