Hi  cant see the primary key column in master detail  form

I have a master detail form .In the first master form i am unable to see the primary key
Now the form is built completley and i also will like to see the primary key column visible in master report
If i had set the primary key as rowid then i could have seen the primary key ..
Now i can see the pencil icon (The eidt row pencil icon) instead of the actual primary key column . .which is a number data..
I will like that too be visible ..Can any one guide what should i do for this..
Thanks

Hi Mat,,
I am using apex 4.2 db version 11g and in the first master page i had set the value of combo which is primary key column as text
But still iam not able to see the number ..Note if i recreate the form ..with rowid as primary key i am able to see the column since the pencil icon(edit icon) is on row id..
Currently All i see is the edit icon ..I need both the edit icon and also the number ..
Thanks

Similar Messages

  • Change primary key field in Master-Detail Form (Urgent)

    Hi,
    Can some experts share your valuable experience on the problem below?
    We have created a form Master-Detail relation. For some reasons, we have to allow the primary key field to be editable. But we couln't achieve it in Form 6i. It gives update error during commit.
    Your kind help will be highly appreciated.
    Regards,
    YM

    Hi there,
    I think the problem is because u are updating the primary key in the master block but since it is a master detail block u need to update it in the detail block as well.so what i suggest u to do is in the pre-insert trigger assign the value of master primarykey to the detail primary key....
    just check this out hopefully this shud help u.
    Bye
    Atul

  • Knowing the primary key columns of the given table

    Hi,
    How can I get the primary key columns of the given table?
    Regards,
    Sachin R.K.

    You can find the constraint_name from all_constraints/user_constraints for constraint_type = 'P' (which is the primary key constraint).
    And then see which columns are in for the constriant_name
    in all_cons_columns/user_cons_columns view.
    Below is the example
    select acc.column_name from
    all_cons_columns acc, all_constraints ac
    where acc.constraint_name = ac.constraint_name
    and acc.table_name = 'DEPT' AND acc.owner = 'SCOTT'
    and ac.constraint_type = 'P'
    Hope this helps
    Srinivasa Medam

  • Batch processing problem: Seeing the primary key (id) in the test cases...

    Another problem we seem to be having is how to read the primary key into a base attribute of an entity.
    In batch processing, we may define the "id" as the primary key on the table. We need to get that id and the foreign key ids into the base attributes in the rule set...
    How do we go about doing that?

    Perhaps better, if you could give me a sample xml config with global and one entity. The only attribute in the entity should be the id... The id should be the primary key in both OPA and Oracle...
    The global table in oracle would contain a single column with the global id.
    The child table in oracle would contain 2 columns -> one for the global ref id and one for the child key...
    I think you will find problems.
    As a note we have duct-tape solved this by creating views and making column copies in the views of the child id and then mapping the id in oracle to the duplicate column in the view.
    So our child view contains the child table with the child id repeated twice so that we can map...

  • How to find out the primary key column of a database table?

    Hi
    Given the following scenario :
    Given an inputfield, the user can enter a table name. The code behind will base on the table name given and extract out the fieldname of the primary key and concatenate the two field to become a unique string.
    Eg. Order ID and Product ID make out a primary key.
    How do i achieve that? Any code sample?
    Regards,
    Rayden

    Check the below code :
    REPORT zTest no standard page heading.
    data : i_DD03P like DD03P occurs 0 with header line.
    data v_table like DCOBJDEF-NAME.
    parameters : p_table like dd02l-tabname.
    start-of-selection.
    v_table = p_table.
    CALL FUNCTION 'BDL_DDIF_TABL_GET'
      EXPORTING
        NAME                = v_table
       STATE               = 'A'
       LANGU               = 'E'
    IMPORTING
      GOTSTATE            =
      DD02V_WA            =
      DD09L_WA            =
    TABLES
       DD03P_TAB           = i_DD03P
      DD05M_TAB           =
      DD08V_TAB           =
      DD12V_TAB           =
      DD17V_TAB           =
    EXCEPTIONS
       ILLEGAL_INPUT       = 1
       OTHERS              = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    loop at i_DD03P.
    if i_dd03p-KEYFLAG = 'X'.
    write:/ 'Key fields', i_dd03p-FIELDNAME.
    endif.
    endloop.
    Thanks
    Seshu

  • Primary key column in manual tabular form

    I am creating a manual tabular form and am unsure what to do for my primary key column. When I do this with the wizard, I'm allowed to specifiy a Primary Key Source Type and the Primary Key Source (my sequence). Is there a way to do this in a manual tabular form?
    I'm creating the column with the call 'wwv_flow_item.display_and_save(2,hours_id) hours_id' but when I edit the 'Tabular Form Element' section, I don't have the Primary Key fields anywhere to edit...only Reference Table Owner, Reference Table/Column Name. Where can I specify the sequence?
    Thanks,
    Janel

    In the process ApplyMRD, try specifying the 'Secondary Key Column' in the section 'Source: Multi Row Update and Delete' to the second key column in the tabular form.
    I haven't tested this with your situation, but worth a shot.

  • Problem with primary key violation in master-detail screens

    Hi,
    I found a problem/bug in master-detail screens in which the PK of the detail table consist of the PK of the master table and an additional column. E.g. a manually entered sequence 'in parent'.
    I will use the following simple scenario to explain the problem (it's easy to reproduce):
    PROJECT table
    # id (PK)
    * name
    PROJECT REQUIREMENTS table
    # prj_id (PK)
    # sequence_id (PK)
    * description
    Just create the BC EO, VO and AM and set both display properties of the prj_id attribute of the project requirements VO to hidden.
    Create a new screen in the application structure file in which you can select a project (table-form layout) and display the details (table layout) on the same page.
    With this basic setup you can generate the app to enter, update and delete projects and their requirements.
    The problem occurs if you have a project with a least 1 requirements stored in the database and you try to enter a second requirement with an existing sequence_id within the project. This is an use case in which a end-user enters wrong data.
    So assume we have in the database:
    prj_id sequence_id description
    ====== =========== ===========
    1 1 req1
    and the end-user enters (prj_id is entered automatically as it's not displayed):
    1 1 req2 >> user should have enterd sequence_id 2...
    Step 1. If you try to save an error will be displayed:
    JBO-25013: Too many objects match the primary key oracle.jbo.Key[227300 1 ].
    And the sequnece_id is emptied automatically.
    Step 2. So the end-user re-enters the sequence_id but fills in 2 now and saves.
    Another error is displayed: JBO-27014 sequence_id in AppModule is required
    How strange? Everything is filled in already.
    Step 3. If you just hit save again (without changing anything) you got a transaction completed successfully.
    I checked the logfiles and noticed an exception during after executing step 2.
    oracle.jbo.AttrValException: JBO-27014: Attribute SequenceId in AppModule.ProjectRequirementsView2 is required     at oracle.jbo.AttrValException.<init>(AttrValException.java)     at oracle.jbo.server.JboMandatoryAttributesValidator.validate(JboMandatoryAttributesValidator.java)     at oracle.jbo.server.EntityDefImpl.validate(EntityDefImpl.java:2051)     at oracle.jbo.server.EntityImpl.validateEntity(EntityImpl.java:1373)     at mypackage1.ProjectRequirementsImpl.validateEntity(JwTekeningnummerImpl.java:273)     at oracle.jbo.server.EntityImpl.validate(EntityImpl.java:1508)     at oracle.jbo.server.EntityImpl.validateChildren(EntityImpl.java:1232)     at oracle.jbo.server.EntityImpl.validateEntity(EntityImpl.java:1339)     at oracle.jbo.server.EntityImpl.validate(EntityImpl.java:1508)     at oracle.jbo.server.DBTransactionImpl.validate(DBTransactionImpl.java:3965)     at oracle.adf.model.bc4j.DCJboDataControl.validate(DCJboDataControl.java:967)     at oracle.adf.model.binding.DCBindingContainer.validateInputValues(DCBindingContainer.java:1683)     at oracle.jheadstart.view.adfuix.JhsInitModelListener.validateInputValues(JhsInitModelListener.java:193)     at oracle.jheadstart.view.adfuix.JhsInitModelListener._doModelUpdate(JhsInitModelListener.java:166)     at oracle.jheadstart.view.adfuix.JhsInitModelListener.eventStarted(JhsInitModelListener.java:92)     at oracle.cabo.servlet.AbstractPageBroker._fireUIXRequestEvent(Unknown Source)     at oracle.cabo.servlet.AbstractPageBroker.handleRequest(Unknown Source)     at oracle.cabo.servlet.ui.BaseUIPageBroker.handleRequest(Unknown Source)     at oracle.adf.controller.struts.actions.StrutsUixLifecycle$NonRenderingPageBroker.handleRequest(StrutsUixLifecycle.java:325)     at oracle.cabo.servlet.PageBrokerHandler.handleRequest(Unknown Source)     at oracle.adf.controller.struts.actions.StrutsUixLifecycle._runUixController(StrutsUixLifecycle.java:215)     at oracle.adf.controller.struts.actions.StrutsUixLifecycle.processUpdateModel(StrutsUixLifecycle.java:106)     at oracle.jheadstart.controller.strutsadf.action.JhsStrutsUixLifecycle.processUpdateModel(JhsStrutsUixLifecycle.java:140)     at oracle.adf.controller.struts.actions.DataAction.processUpdateModel(DataAction.java:317)     at oracle.jheadstart.controller.strutsadf.action.JhsDataAction.processUpdateModel(JhsDataAction.java:622)     at oracle.adf.controller.struts.actions.DataAction.processUpdateModel(DataAction.java:508)     at oracle.adf.controller.lifecycle.PageLifecycle.handleLifecycle(PageLifecycle.java:112)     at oracle.adf.controller.struts.actions.StrutsUixLifecycle.handleLifecycle(StrutsUixLifecycle.java:70)     at oracle.adf.controller.struts.actions.DataAction.handleLifecycle(DataAction.java:223)     at oracle.jheadstart.controller.strutsadf.action.JhsDataAction.handleLifecycle(JhsDataAction.java:389)     at oracle.adf.controller.struts.actions.DataAction.execute(DataAction.java:155)     at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)     at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)     at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485)     at oracle.jheadstart.controller.strutsadf.JhsActionServlet.process(JhsActionServlet.java:127)     at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:527)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:765)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)     at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)     at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:239)     at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:239)     at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)     at oracle.jheadstart.controller.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java)     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:645)     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)     at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)     at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)     at java.lang.Thread.run(Thread.java:534)
    This also explains why I got a error message within the application at step 2, but not an expected error message!
    From the logfile I can see something is going wrong in the oracle.jbo.server.EntityImpl.validateEntity method.
    To get more insight what was goning on I overridden the validateEntity method in my VO Impl class:
    protected void validateEntity()
    System.out.println("MARCEL>> sequenceId=" + getSequenceId());
    System.out.println("MARCEL>> description=" + getDescription());
    super.validateEntity();
    In step 1 the validateEntity is not called.
    In step 2 the sequeceId = null (and description = reg2)
    I expected the sequeceId to be 2 now as I entered this. Furthermore if I look at the (JhsActionServlet) request parameters in the log, I can see that the value of the sequenceId was 2. I guess something is going wrong at this point in converting the request parametes to the EO.
    In step 3 the sequeceId = 2 (as expected)
    Note that I'm using the evaluation copy version of JHeadstart 10.1.2.
    If this was patched in any later build, could you please tell which changes I have to make to the JHS sources to solve this problem.
    Regards,
    Marcel

    Marcel,
    I cannot reproduce this in version 10.1.2.2. We did not "fix" this, although changes in the runtime might have fixed this "silently". I suggest you upgrade to 10.1.2.2 and see whether you still get the error.
    Steven Davelaar,
    JHeadstart Team.

  • Updating columns in master/detail form

    Changes were made to the database that is in the master part of a master/detail form. I have tried to add the new fields using "Create Item" on the page definition.
    I have gone through the wizard and set the source items to:
    Source Used: Always
    Source Type: Database Column
    Session State: per session
    Source Value: AppsDependentOn (the name of the newly added field)
    It seems that the form will not display the new column - it does display the label and a blank textfield. I have no problem adding columns to the detail part of the form.

    "197331",
    For Source Value, try uppercase instead: APPSDEPENDENTON
    Sergio

  • DBMS_CDC find only the columns that are changed along with the primary key in the table

    Hello,
    We are having a requirement to find the change data in the production environment.
    We are planning to use the DBMS_CDC utility.
    But for  example in the create change table 1 picked emp_id,ename, address, salary,dob.
    I have a sample data of
    empid
    ename
    address
    salary
    DOB
    1
    test1
    24 test street
    2000
    20-Jan-98
    2
    test2
    25 test street
    2500
    15-Aug-97
    if ename for empid 1 is changed to test1_test3 from test1.
    My CDC is capturing  the values in the old and new values in the 5 columns.
    But i need to get only the empid (primary key of the source table) and the ename column as only that's been updated not the rest of the 3 columns.
    Can i accomplish this.
    Please advice.

    Hello,
    Thanks for the information.
    but if i change the change table  then i will miss the other columns right?
    I want to get the columns( empid and ename) only if ename is changed. i.e when ever any column in emp table changes i need to get all the columns where the data is changed along with the primary key columns empid.
    Is there any way i can tweak the parameters so that i can achieve this or is there any other way using the cdc i can get this data.
    Thanks

  • JPA: Attr ... mapped to a primary key column in the DB. Update not allowed.

    Let me just say that I posted a bug report for this here:
    https://glassfish.dev.java.net/issues/show_bug.cgi?id=3937
    But I'm also posting the info here, so that people who search on this forum may get some help:
    TopLink (both Essentials and 11g) has a problem with flushing entities
    containing a self-reference relationship. When flushing, the following exception
    occurs:
    Exception [TOPLINK-7251] (Oracle TopLink Essentials - 2.1 (Build b14-fcs
    (12/17/2007))): oracle.toplink.essentials.exceptions.ValidationException
    Exception Description: The attribute [id] of class [test.jpa.entities.Person] is
    mapped to a primary key column in the database. Updates are not allowed.
    No manual updates have been made to ANY primary key.
    What I'm doing is:
    1. I instantiate a new entity.
    2. I start a transaction
    3. I persist the new entity.
    4. I read an existing entity from the DB.
    5. I let the existing entity point to the new entity via the self-reference
    relationship.
    6. I flush the persistence context.
    7. I issue commit(), and the exception occurs. (I have provided the stack traces for various versions of TopLink below.)
    This is a clear bug.
    Here are some additional observations:
    1. Reproduced on the following versions of TopLink:
    1.1. Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))
    1.2. Oracle TopLink Essentials - 2.1 (Build b14-fcs (12/17/2007))
    1.3. Oracle TopLink - 11g Technology Preview 3 (11.1.1.0.0) (Build 071214)
    2. Reproducible both on Java SE and Java EE. (I tested on Oracle Application Server)
    3. Reproducible with and without class weaving
    4. Reproducible regardless of whether the JPA annotations are on fields or on
    methods
    5. Reproducible regardless of whether "cascade={CascadeType.PERSIST}" is used or
    not.
    6. Reproducible regardless of the fetch type of the self-reference relationship
    (EAGER or LAZY).
    Also:
    1. Without flushing, the bug doesn't occur. That is, if I commit without
    flushing, it works.
    2. Without setting the self-reference relationship, the bug doesn't occur.
    This is an issue that appears when using BOTH self-reference relationship AND
    flushing.
    Best regards,
    Bisser
    The message was edited by bisser:
    Added info that the exception occurs "when I issue commit()" on step 7.

    I'm extremely surprised that you couldn't reproduce the error. It's reproduced each time when I run the Test Scenario that I described above.
    You could download a sample Eclipse project that reproduces the error from here: https://glassfish.dev.java.net/issues/show_bug.cgi?id=3937
    For the log below I used TopLink, version: Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007)).
    Could you, please, tell me what version you use and I will try the Test Case on it.
    Here's the FINEST log:
    [TopLink Finest]: 2008.01.09 07:35:58.094--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--property=toplink.weaving; value=false
    [TopLink Finest]: 2008.01.09 07:35:59.312--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--property=toplink.orm.throw.exceptions; default value=true
    [TopLink Finer]: 2008.01.09 07:35:59.312--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--Searching for default mapping file in file:/D:/dev/bull/jpa_pk_bug/bin/
    [TopLink Config]: 2008.01.09 07:35:59.547--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--The alias name for the entity class [class test.jpa.entities.Person] is being defaulted to: Person.
    [TopLink Config]: 2008.01.09 07:35:59.594--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--The column name for element [private java.lang.Long test.jpa.entities.Person.id] is being defaulted to: ID.
    [TopLink Config]: 2008.01.09 07:35:59.609--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--The column name for element [private java.lang.String test.jpa.entities.Person.name] is being defaulted to: NAME.
    [TopLink Config]: 2008.01.09 07:35:59.641--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--The target entity (reference) class for the many to one mapping element [test.jpa.entities.Person test.jpa.entities.Person.mgr] is being defaulted to: class test.jpa.entities.Person.
    [TopLink Config]: 2008.01.09 07:35:59.703--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--The primary key column name for the mapping element [test.jpa.entities.Person test.jpa.entities.Person.mgr] is being defaulted to: ID.
    [TopLink Finest]: 2008.01.09 07:35:59.703--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--end predeploying Persistence Unit Test; state Predeployed; factoryCount 0
    [TopLink Finer]: 2008.01.09 07:35:59.703--Thread(Thread[Main Thread,5,main])--cmp_init_transformer_is_null
    [TopLink Finest]: 2008.01.09 07:35:59.703--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--begin predeploying Persistence Unit Test; state Predeployed; factoryCount 0
    [TopLink Finest]: 2008.01.09 07:35:59.703--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--end predeploying Persistence Unit Test; state Predeployed; factoryCount 1
    [TopLink Finest]: 2008.01.09 07:35:59.719--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--begin deploying Persistence Unit Test; state Predeployed; factoryCount 1
    [TopLink Finest]: 2008.01.09 07:35:59.734--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--property=toplink.logging.level; value=FINEST; translated value=FINEST
    [TopLink Finest]: 2008.01.09 07:35:59.734--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--property=toplink.logging.level; value=FINEST; translated value=FINEST
    [TopLink Finest]: 2008.01.09 07:35:59.750--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--property=toplink.jdbc.user; value=rms
    [TopLink Finest]: 2008.01.09 07:35:59.750--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--property=toplink.jdbc.password; value=xxxxxx
    [TopLink Finest]: 2008.01.09 07:36:00.766--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--property=toplink.target-database; value=Oracle; translated value=oracle.toplink.essentials.platform.database.oracle.OraclePlatform
    [TopLink Finest]: 2008.01.09 07:36:00.781--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--property=toplink.jdbc.driver; value=oracle.jdbc.OracleDriver
    [TopLink Finest]: 2008.01.09 07:36:00.781--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--property=toplink.jdbc.url; value=jdbc:oracle:thin:@//10.20.6.126:1521/region2
    [TopLink Info]: 2008.01.09 07:36:00.797--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--TopLink, version: Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))
    [TopLink Config]: 2008.01.09 07:36:00.812--ServerSession(1968077)--Connection(5182312)--Thread(Thread[Main Thread,5,main])--connecting(DatabaseLogin(
         platform=>OraclePlatform
         user name=> "rms"
         datasource URL=> "jdbc:oracle:thin:@//10.20.6.126:1521/region2"
    [TopLink Config]: 2008.01.09 07:36:01.797--ServerSession(1968077)--Connection(4252099)--Thread(Thread[Main Thread,5,main])--Connected: jdbc:oracle:thin:@//10.20.6.126:1521/region2
         User: RMS
         Database: Oracle  Version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
         Driver: Oracle JDBC driver  Version: 10.2.0.1.0
    [TopLink Config]: 2008.01.09 07:36:01.797--ServerSession(1968077)--Connection(5744890)--Thread(Thread[Main Thread,5,main])--connecting(DatabaseLogin(
         platform=>OraclePlatform
         user name=> "rms"
         datasource URL=> "jdbc:oracle:thin:@//10.20.6.126:1521/region2"
    [TopLink Config]: 2008.01.09 07:36:01.875--ServerSession(1968077)--Connection(5747801)--Thread(Thread[Main Thread,5,main])--Connected: jdbc:oracle:thin:@//10.20.6.126:1521/region2
         User: RMS
         Database: Oracle  Version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
         Driver: Oracle JDBC driver  Version: 10.2.0.1.0
    [TopLink Config]: 2008.01.09 07:36:01.891--ServerSession(1968077)--Connection(5760373)--Thread(Thread[Main Thread,5,main])--connecting(DatabaseLogin(
         platform=>OraclePlatform
         user name=> "rms"
         datasource URL=> "jdbc:oracle:thin:@//10.20.6.126:1521/region2"
    [TopLink Config]: 2008.01.09 07:36:01.969--ServerSession(1968077)--Connection(5763284)--Thread(Thread[Main Thread,5,main])--Connected: jdbc:oracle:thin:@//10.20.6.126:1521/region2
         User: RMS
         Database: Oracle  Version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
         Driver: Oracle JDBC driver  Version: 10.2.0.1.0
    [TopLink Config]: 2008.01.09 07:36:01.969--ServerSession(1968077)--Connection(5497095)--Thread(Thread[Main Thread,5,main])--connecting(DatabaseLogin(
         platform=>OraclePlatform
         user name=> "rms"
         datasource URL=> "jdbc:oracle:thin:@//10.20.6.126:1521/region2"
    [TopLink Config]: 2008.01.09 07:36:02.047--ServerSession(1968077)--Connection(5500006)--Thread(Thread[Main Thread,5,main])--Connected: jdbc:oracle:thin:@//10.20.6.126:1521/region2
         User: RMS
         Database: Oracle  Version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
         Driver: Oracle JDBC driver  Version: 10.2.0.1.0
    [TopLink Config]: 2008.01.09 07:36:02.047--ServerSession(1968077)--Connection(5512041)--Thread(Thread[Main Thread,5,main])--connecting(DatabaseLogin(
         platform=>OraclePlatform
         user name=> "rms"
         datasource URL=> "jdbc:oracle:thin:@//10.20.6.126:1521/region2"
    [TopLink Config]: 2008.01.09 07:36:02.125--ServerSession(1968077)--Connection(5514977)--Thread(Thread[Main Thread,5,main])--Connected: jdbc:oracle:thin:@//10.20.6.126:1521/region2
         User: RMS
         Database: Oracle  Version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
         Driver: Oracle JDBC driver  Version: 10.2.0.1.0
    [TopLink Config]: 2008.01.09 07:36:02.125--ServerSession(1968077)--Connection(5527528)--Thread(Thread[Main Thread,5,main])--connecting(DatabaseLogin(
         platform=>OraclePlatform
         user name=> "rms"
         datasource URL=> "jdbc:oracle:thin:@//10.20.6.126:1521/region2"
    [TopLink Config]: 2008.01.09 07:36:02.203--ServerSession(1968077)--Connection(5530440)--Thread(Thread[Main Thread,5,main])--Connected: jdbc:oracle:thin:@//10.20.6.126:1521/region2
         User: RMS
         Database: Oracle  Version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
         Driver: Oracle JDBC driver  Version: 10.2.0.1.0
    [TopLink Config]: 2008.01.09 07:36:02.203--ServerSession(1968077)--Connection(5542993)--Thread(Thread[Main Thread,5,main])--connecting(DatabaseLogin(
         platform=>OraclePlatform
         user name=> "rms"
         datasource URL=> "jdbc:oracle:thin:@//10.20.6.126:1521/region2"
    [TopLink Config]: 2008.01.09 07:36:02.281--ServerSession(1968077)--Connection(5545904)--Thread(Thread[Main Thread,5,main])--Connected: jdbc:oracle:thin:@//10.20.6.126:1521/region2
         User: RMS
         Database: Oracle  Version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
         Driver: Oracle JDBC driver  Version: 10.2.0.1.0
    [TopLink Finest]: 2008.01.09 07:36:02.312--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--sequencing connected, state is Preallocation_NoTransaction_State
    [TopLink Info]: 2008.01.09 07:36:02.484--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--file:/D:/dev/bull/jpa_pk_bug/bin/-Test login successful
    [TopLink Finest]: 2008.01.09 07:36:02.484--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--end deploying Persistence Unit Test; state Deployed; factoryCount 1
    [TopLink Finer]: 2008.01.09 07:36:02.516--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--client acquired
    [TopLink Finest]: 2008.01.09 07:36:02.531--UnitOfWork(5663897)--Thread(Thread[Main Thread,5,main])--Execute query DoesExistQuery()
    [TopLink Finest]: 2008.01.09 07:36:02.547--UnitOfWork(5663897)--Thread(Thread[Main Thread,5,main])--PERSIST operation called on: test.jpa.entities.Person@563c8c.
    [TopLink Finest]: 2008.01.09 07:36:02.562--ClientSession(5666151)--Thread(Thread[Main Thread,5,main])--Execute query ValueReadQuery()
    [TopLink Fine]: 2008.01.09 07:36:02.594--ServerSession(1968077)--Connection(5747801)--Thread(Thread[Main Thread,5,main])--SELECT PERSONS_ID_SEQ.NEXTVAL FROM DUAL
    [TopLink Finest]: 2008.01.09 07:36:03.297--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--sequencing preallocation for PERSONS_ID_SEQ: objects: 1 , first: 5, last: 5
    [TopLink Finest]: 2008.01.09 07:36:03.312--UnitOfWork(5663897)--Thread(Thread[Main Thread,5,main])--assign sequence to the object (5 -> test.jpa.entities.Person@563c8c)
    [TopLink Finest]: 2008.01.09 07:36:03.328--UnitOfWork(5663897)--Thread(Thread[Main Thread,5,main])--Execute query ReadObjectQuery(test.jpa.entities.Person)
    [TopLink Fine]: 2008.01.09 07:36:03.438--ServerSession(1968077)--Connection(4252099)--Thread(Thread[Main Thread,5,main])--SELECT ID, NAME, MGR_ID FROM Persons WHERE (ID = ?)
         bind => [1]
    [TopLink Finest]: 2008.01.09 07:36:03.531--UnitOfWork(5663897)--Thread(Thread[Main Thread,5,main])--Register the existing object test.jpa.entities.Person@3a4484
    [TopLink Finer]: 2008.01.09 07:36:03.625--ClientSession(5666151)--Connection(5763284)--Thread(Thread[Main Thread,5,main])--begin transaction
    [TopLink Finest]: 2008.01.09 07:36:03.625--UnitOfWork(5663897)--Thread(Thread[Main Thread,5,main])--Execute query UpdateObjectQuery(test.jpa.entities.Person@3a57fa)
    [TopLink Finest]: 2008.01.09 07:36:03.641--UnitOfWork(5663897)--Thread(Thread[Main Thread,5,main])--Execute query WriteObjectQuery(test.jpa.entities.Person@563c8c)
    [TopLink Fine]: 2008.01.09 07:36:03.656--ClientSession(5666151)--Connection(5763284)--Thread(Thread[Main Thread,5,main])--INSERT INTO Persons (ID, NAME, MGR_ID) VALUES (?, ?, ?)
         bind => [5, Boss, null]
    [TopLink Fine]: 2008.01.09 07:36:03.688--ClientSession(5666151)--Connection(5763284)--Thread(Thread[Main Thread,5,main])--UPDATE Persons SET MGR_ID = ? WHERE (ID = ?)
         bind => [5, 1]
    [TopLink Finer]: 2008.01.09 07:36:03.703--UnitOfWork(5663897)--Thread(Thread[Main Thread,5,main])--begin unit of work commit
    [TopLink Finest]: 2008.01.09 07:36:03.703--UnitOfWork(5663897)--Thread(Thread[Main Thread,5,main])--Execute query UpdateObjectQuery(test.jpa.entities.Person@563c8c)
    [TopLink Warning]: 2008.01.09 07:36:03.812--UnitOfWork(5663897)--Thread(Thread[Main Thread,5,main])--Local Exception Stack:
    Exception [TOPLINK-7251] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.ValidationException
    Exception Description: The attribute [id] of class [test.jpa.entities.Person] is mapped to a primary key column in the database. Updates are not allowed.
         at oracle.toplink.essentials.exceptions.ValidationException.primaryKeyUpdateDisallowed(ValidationException.java:2222)
         at oracle.toplink.essentials.mappings.foundation.AbstractDirectMapping.writeFromObjectIntoRowWithChangeRecord(AbstractDirectMapping.java:750)
         at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildRowForUpdateWithChangeSet(ObjectBuilder.java:948)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.updateObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:1263)
         at oracle.toplink.essentials.queryframework.UpdateObjectQuery.executeCommitWithChangeSet(UpdateObjectQuery.java:91)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:390)
         at oracle.toplink.essentials.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:109)
         at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:628)
         at oracle.toplink.essentials.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:555)
         at oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:138)
         at oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:110)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2233)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:909)
         at oracle.toplink.essentials.internal.sessions.CommitManager.commitChangedObjectsForClassWithChangeSet(CommitManager.java:309)
         at oracle.toplink.essentials.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:195)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:2657)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1044)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:403)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1126)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:107)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:856)
         at oracle.toplink.essentials.internal.ejb.cmp3.transaction.base.EntityTransactionImpl.commit(EntityTransactionImpl.java:102)
         at oracle.toplink.essentials.internal.ejb.cmp3.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:60)
         at test.jpa.TestPkBug.runTest(TestPkBug.java:53)
         at test.jpa.TestPkBug.main(TestPkBug.java:95)
    [TopLink Finer]: 2008.01.09 07:36:03.828--ClientSession(5666151)--Connection(5763284)--Thread(Thread[Main Thread,5,main])--rollback transaction
    [TopLink Finer]: 2008.01.09 07:36:03.844--UnitOfWork(5663897)--Thread(Thread[Main Thread,5,main])--release unit of work
    [TopLink Finer]: 2008.01.09 07:36:03.844--UnitOfWork(5663897)--Thread(Thread[Main Thread,5,main])--initialize identitymaps
    [TopLink Finer]: 2008.01.09 07:36:03.844--ClientSession(5666151)--Thread(Thread[Main Thread,5,main])--client released
    [TopLink Finest]: 2008.01.09 07:36:03.844--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--begin undeploying Persistence Unit Test; state Deployed; factoryCount 1
    [TopLink Finest]: 2008.01.09 07:36:03.844--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--sequencing disconnected
    [TopLink Config]: 2008.01.09 07:36:03.844--ServerSession(1968077)--Connection(4252099)--Thread(Thread[Main Thread,5,main])--disconnect
    [TopLink Finer]: 2008.01.09 07:36:03.859--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--initialize identitymaps
    [TopLink Info]: 2008.01.09 07:36:03.859--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--file:/D:/dev/bull/jpa_pk_bug/bin/-Test logout successful
    [TopLink Config]: 2008.01.09 07:36:03.859--ServerSession(1968077)--Connection(5747801)--Thread(Thread[Main Thread,5,main])--disconnect
    [TopLink Config]: 2008.01.09 07:36:03.859--ServerSession(1968077)--Connection(5182312)--Thread(Thread[Main Thread,5,main])--disconnect
    [TopLink Config]: 2008.01.09 07:36:03.859--ServerSession(1968077)--Connection(5500006)--Thread(Thread[Main Thread,5,main])--disconnect
    [TopLink Config]: 2008.01.09 07:36:03.875--ServerSession(1968077)--Connection(5514977)--Thread(Thread[Main Thread,5,main])--disconnect
    [TopLink Config]: 2008.01.09 07:36:03.875--ServerSession(1968077)--Connection(5530440)--Thread(Thread[Main Thread,5,main])--disconnect
    [TopLink Config]: 2008.01.09 07:36:03.875--ServerSession(1968077)--Connection(5545904)--Thread(Thread[Main Thread,5,main])--disconnect
    [TopLink Config]: 2008.01.09 07:36:03.891--ServerSession(1968077)--Connection(5763284)--Thread(Thread[Main Thread,5,main])--disconnect
    [TopLink Finest]: 2008.01.09 07:36:03.891--ServerSession(1968077)--Thread(Thread[Main Thread,5,main])--end undeploying Persistence Unit Test; state Undeployed; factoryCount 0
    Exception in thread "Main Thread" javax.persistence.RollbackException: Exception [TOPLINK-7251] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.ValidationException
    Exception Description: The attribute [id] of class [test.jpa.entities.Person] is mapped to a primary key column in the database. Updates are not allowed.
         at oracle.toplink.essentials.internal.ejb.cmp3.transaction.base.EntityTransactionImpl.commit(EntityTransactionImpl.java:120)
         at oracle.toplink.essentials.internal.ejb.cmp3.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:60)
         at test.jpa.TestPkBug.runTest(TestPkBug.java:53)
         at test.jpa.TestPkBug.main(TestPkBug.java:95)
    Caused by: Exception [TOPLINK-7251] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.ValidationException
    Exception Description: The attribute [id] of class [test.jpa.entities.Person] is mapped to a primary key column in the database. Updates are not allowed.
         at oracle.toplink.essentials.exceptions.ValidationException.primaryKeyUpdateDisallowed(ValidationException.java:2222)
         at oracle.toplink.essentials.mappings.foundation.AbstractDirectMapping.writeFromObjectIntoRowWithChangeRecord(AbstractDirectMapping.java:750)
         at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildRowForUpdateWithChangeSet(ObjectBuilder.java:948)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.updateObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:1263)
         at oracle.toplink.essentials.queryframework.UpdateObjectQuery.executeCommitWithChangeSet(UpdateObjectQuery.java:91)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:390)
         at oracle.toplink.essentials.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:109)
         at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:628)
         at oracle.toplink.essentials.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:555)
         at oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:138)
         at oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:110)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2233)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:909)
         at oracle.toplink.essentials.internal.sessions.CommitManager.commitChangedObjectsForClassWithChangeSet(CommitManager.java:309)
         at oracle.toplink.essentials.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:195)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:2657)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1044)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:403)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1126)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:107)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:856)
         at oracle.toplink.essentials.internal.ejb.cmp3.transaction.base.EntityTransactionImpl.commit(EntityTransactionImpl.java:102)
         ... 3 moreEDIT: Are you using the EXACT Test Case as I have described it in the previous posts? It's important that you commit(), and not rollback(), the transaction after the flush.
    EDIT: Updated the log because I found out that I had made a small change to the original Test Case while I was trying to find a workaround. The current log is produced by the EXACT Test Case I described in my previous posts.
    Message was edited by:
    bisser

  • Primary key column as the key of the cache

    Hi All,
    I am implementing a cache backed by HibernateCacheStore for a table. Cache contains key as the primary key of the table and value as the entire row in object format. the primary key is generated by hibernate.
    when i am inserting new rows through coherence (i.e cahce.put) what persistence strategy should is use to set the cache entries.
    I cannot use cache.put (key, value) because key is the primary key of the table which is not generated yet.
    and if i use the session.save(value) the persisted value is not in the cache.
    is there any mechanism to map the cache key as the primary key column of the table.
    Regards
    S

    Hi -
    Using Hibernate as a CacheStore for Coherence, the key of the cache entry is also the key of the entity
    being stored via Hibernate. For this reason keys for new cache entries must be generated ahead of time.
    A UUID can be used. The commons component of the Incubator project has a key generation utility that
    might be worth looking at.
    /Mark

  • No Primary Key Column set. error

    Hi all,
    Firstly, thank you to DWFAQ for advice a tutorials.
    Secondly, I have built a contact form using the update record
    form wizard in ADDT -
    http://dwfaq.info/home.php?id=4
    I have hit a problem, when running the form I get the
    following error:
    Error:
    Internal error.
    Developer Details:
    tNG_update.prepareSQL:
    No Primary Key Column was set. (UPD_NO_PK_SET)
    tNG Execution Trace - VIEW
    * tNG_update.executeTransaction
    o STARTER.Trigger_Default_Starter
    o tNG_update.doTransaction
    + BEFORE.Trigger_Default_saveData
    # tNG_update.saveData
    + BEFORE.Trigger_Default_FormValidation
    + tNG_update.prepareSQL*
    o tNG_update.getRecordset
    o tNG_update.getFakeRsArr
    o tNG_update.getLocalRecordset
    o tNG_update.getFakeRecordset
    Could somebody please help - I'm so close it hurts ;-)
    Thank you
    NJ

    Heya,
    Looks like your DB is all setup correctly it must be the
    primary key in the transaction of the script.
    Make sure id is set as the primary key in your Update Record
    Form Wizard. You php code should look something like this:
    // Add columns
    $upd_contact->setTable("cvform");
    $upd_contact->addColumn("firstname", "STRING_TYPE",
    "POST", "firstname");
    $upd_contact->addColumn("lastname", "STRING_TYPE", "POST",
    "lastname");
    $upd_contact->addColumn("email", "STRING_TYPE", "POST",
    "email");
    $upd_contact->addColumn("message", "STRING_TYPE", "POST",
    "message");
    $upd_contact->addColumn("attachment", "FILE_TYPE",
    "FILES", "attachment");
    $upd_contact->addColumn("phonenumber", "STRING_TYPE",
    "POST", "phonenumber");
    $upd_contact->setPrimaryKey("id", "NUMERIC_TYPE", "VALUE",
    "id");
    // Execute all the registered transactions
    $tNGs->executeTransactions();
    You may have to post your script to see what the problem is.
    Most likely something not followed correctly in the tutorial. If
    you are able to post your php script as a text file then link to
    the file here with .txt extension I can take a look at it and see
    where the problem is. Make sure to remove any info that may
    compromise your database when providing your php script or contact
    me through my website and I can help you out off the forum.
    Hope that helps!

  • No Primary Key Column was set. (UPD_NO_PK_SET)

    I'm trying to build an update record page that gets the primary key value passed from a dynamic edit selection. dynamic list is great..opens up to the update record page great...values filled in including the primary key...i can see the primary key value listed in the URL...but then i hit submit and I get:
    No Primary Key Column was set. (UPD_NO_PK_SET)
    I have seen this error posted a lot, but no concise solution..been working on this for days...Please please help..! i'm desperate!

    Ok, I'm confused....with
    <br />
    <br />// Load the KT_back class
    <br />require_once('includes/nxt/KT_back.php');
    <br />
    <br />removed all works great...the delete, the insert. When I do any of those desired functions, I do get back to the dynamic list page..however, I chose to edit say record 12 ..with only 10 showing per page so i'm on the second page...if i cancel..i jump back to record page one...Is that the functionality I'm losing?
    <br />
    <br />hope you dont mind, but I am trying to post the code?
    <br />
    <br />code for statuslist page:
    <br />
    <br /><?php require_once('Connections/PatientDB.php'); ?>
    <br /><?php<br />// Load the common classes<br />require_once('includes/common/KT_common.php');<br /><br />// Load the required classes<br />require_once('includes/tfi/TFI.php');<br />require_once('includes/tso/TSO.php');<br />require_once('includes/nav/NAV.php');<br /><br />// Make unified connection variable<br />$conn_PatientDB = new KT_connection($PatientDB, $database_PatientDB);<br /><br />if (!function_exists("GetSQLValueString")) {<br />function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") <br />{<br />  if (PHP_VERSION < 6) {<br />    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;<br />  }<br /><br />  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);<br /><br />  switch ($theType) {<br />    case "text":<br />      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";<br />      break;    <br />    case "long":<br />    case "int":<br />      $theValue = ($theValue != "") ? intval($theValue) : "NULL";<br />      break;<br />    case "double":<br />      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";<br />      break;<br />    case "date":<br />      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";<br />      break;<br />    case "defined":<br />      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;<br />      break;<br />  }<br />  return $theValue;<br />}<br />}<br /><br />// Filter<br />$tfi_listRecordset1 = new TFI_TableFilter($conn_PatientDB, "tfi_listRecordset1");<br />$tfi_listRecordset1->addColumn("status", "STRING_TYPE", "status", "%");<br />$tfi_listRecordset1->Execute();<br /><br />// Sorter<br />$tso_listRecordset1 = new TSO_TableSorter("Recordset1", "tso_listRecordset1");<br />$tso_listRecordset1->addColumn("status");<br />$tso_listRecordset1->setDefault("status");<br />$tso_listRecordset1->Execute();<br /><br />// Navigation<br />$nav_listRecordset1 = new NAV_Regular("nav_listRecordset1", "Recordset1", "", $_SERVER['PHP_SELF'], 10);<br /><br />//NeXTenesio3 Special List Recordset<br />$maxRows_Recordset1 = $_SESSION['max_rows_nav_listRecordset1'];<br />$pageNum_Recordset1 = 0;<br />if (isset($_GET['pageNum_Recordset1'])) {<br />  $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];<br />}<br />$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;<br /><br />// Defining List Recordset variable<br />$NXTFilter_Recordset1 = "1=1";<br />if (isset($_SESSION['filter_tfi_listRecordset1'])) {<br />  $NXTFilter_Recordset1 = $_SESSION['filter_tfi_listRecordset1'];<br />}<br />// Defining List Recordset variable<br />$NXTSort_Recordset1 = "status";<br />if (isset($_SESSION['sorter_tso_listRecordset1'])) {<br />  $NXTSort_Recordset1 = $_SESSION['sorter_tso_listRecordset1'];<br />}<br />mysql_select_db($database_PatientDB, $PatientDB);<br /><br />$query_Recordset1 = "SELECT * FROM status_listEG WHERE  {$NXTFilter_Recordset1}  ORDER BY  {$NXTSort_Recordset1} ";<br />$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);<br />$Recordset1 = mysql_query($query_limit_Recordset1, $PatientDB) or die(mysql_error());<br />$row_Recordset1 = mysql_fetch_assoc($Recordset1);<br /><br />if (isset($_GET['totalRows_Recordset1'])) {<br />  $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];<br />} else {<br />  $all_Recordset1 = mysql_query($query_Recordset1);<br />  $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);<br />}<br />$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;<br />//End NeXTenesio3 Special List Recordset<br /><br />$nav_listRecordset1->checkBoundries();<br />?>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <script src="includes/common/js/base.js" type="text/javascript"></script>
    <br />
    <script src="includes/common/js/utility.js" type="text/javascript"></script>
    <br />
    <script src="includes/skins/style.js" type="text/javascript"></script>
    <br />
    <script src="includes/nxt/scripts/list.js" type="text/javascript"></script>
    <br />
    <script src="includes/nxt/scripts/list.js.php" type="text/javascript"></script>
    <br />
    <script type="text/javascript"></script>$NXT_LIST_SETTINGS = {
    <br /> duplicate_buttons: true,
    <br /> duplicate_navigation: true,
    <br /> row_effects: true,
    <br /> show_as_buttons: true,
    <br /> record_counter: true
    <br />}
    <br />
    <br /> /* Dynamic List row settings */
    <br /> .KT_col_status {width:140px; overflow:hidden;}
    <br />
    <br />
    <br />
    <br />
    <br />
    <div class="KT_tng" id="listRecordset1">
    <br />
    <h1>status_listEG
    <br /> <?php<br />  $nav_listRecordset1->Prepare();<br />  require("includes/nav/NAV_Text_Statistics.inc.php");<br />?>
    <br /></h1>
    <br />
    <div class="KT_tnglist">
    <br />
    <form action="%3C?php%20echo%20KT_escapeAttribute(KT_getFullUri());%20?%3E" method="post" id="form1">
    <br />
    <div class="KT_options">
    <a href="%3C?php%20echo%20$nav_listRecordset1-%3EgetShowAllLink();%20?%3E"><?php echo NXT_getResource("Show"); ?>
    <br /> <?php <br />  // Show IF Conditional region1<br />  if (@$_GET['show_all_nav_listRecordset1'] == 1) {<br />?>
    <br /> <?php echo $_SESSION['default_max_rows_nav_listRecordset1']; ?>
    <br /> <?php <br />  // else Conditional region1<br />  } else { ?>
    <br /> <?php echo NXT_getResource("all"); ?>
    <br /> <?php } <br />  // endif Conditional region1<br />?>
    <br /> <?php echo NXT_getResource("records"); ?></a> &#160;
    <br /> &#160;
    <br /> <?php <br />  // Show IF Conditional region2<br />  if (@$_SESSION['has_filter_tfi_listRecordset1'] == 1) {<br />?>
    <br />
    <a href="%3C?php%20echo%20$tfi_listRecordset1-%3EgetResetFilterLink();%20?%3E">
    <?php echo NXT_getResource("Reset filter"); ?>
    </a>
    <br /> <?php <br />  // else Conditional region2<br />  } else { ?>
    <br />
    <a href="%3C?php%20echo%20$tfi_listRecordset1-%3EgetShowFilterLink();%20?%3E">
    <?php echo NXT_getResource("Show filter"); ?>
    </a>
    <br /> <?php } <br />  // endif Conditional region2<br />?>
    <br /></div>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <table cellpadding="2" cellspacing="0" class="KT_tngtable">
    <thead>
    <tr class="KT_row_order">
    <th>
    <input type="checkbox" name="KT_selAll" id="KT_selAll" />
    <br /></th>
    <th id="status" class="KT_sorter KT_col_status &lt;?php echo $tso_listRecordset1-&gt;getSortIcon('status'); ?&gt;">
    <a href="%3C?php%20echo%20$tso_listRecordset1-%3EgetSortLink('status');%20?%3E">Status</a>
    </th>
    <th>&#160;</th>
    </tr><?php <br />  // Show IF Conditional region3<br />  if (@$_SESSION['has_filter_tfi_listRecordset1'] == 1) {<br />?>
    <tr class="KT_row_filter">
    <td>&#160;</td>
    <td>
    <input type="text" name="tfi_listRecordset1_status" id="tfi_listRecordset1_status" value="<?php echo KT_escapeAttribute(@$_SESSION['tfi_listRecordset1_status']); ?>" size="20" maxlength="20" />
    </td>
    <td>
    <input type="submit" name="tfi_listRecordset1" value="<?php echo NXT_getResource(" />" /&gt;</td>
    </tr><?php } <br />  // endif Conditional region3<br />?>
    </thead>
    <tbody>
    <?php if ($totalRows_Recordset1 == 0) { // Show if recordset empty ?>
    <tr>
    <td colspan="3">
    <?php echo NXT_getResource("The table is empty or the filter you've selected is too restrictive."); ?>
    </td>
    </tr><?php } // Show if recordset empty ?><?php if ($totalRows_Recordset1 > 0) { // Show if recordset not empty ?><?php do { ?>
    <tr class="<?php echo @$cnt1++%2==0 ? "></tr>
    </tbody>
    </table></form></div></div>

  • Updating a primary key column

    I have a table with two columns, both of which make up the primary key. I want the user to be able to update Column2, and to only see relevant records. So, the user should see records where Column1 = :P80_Col1.
    The problem is that since Column2 is part of the primary key, Apex won't let me specify Column2 as updateable in a regular Tabular Form.
    What would be the easiest way to accomplish this?

    Maybe this query could shed some light on your PK's
    SELECT cols.table_name,
           cols.column_name,
           cols.position,
           cons.status,
           cons.owner
    FROM   all_constraints cons,
           all_cons_columns cols
    WHERE  cons.constraint_type = 'P'
           AND cons.constraint_name = cols.constraint_name
           AND cons.owner = cols.owner
    ORDER  BY cols.table_name,
              cols.position;  I understand your predicament but I have this topic debated for decades and personally view composite keys as bad juju.
    The safest thing might be to just add a column, leave the primary key as it is as far as the table is concerned, but use the new column as the primary key for this new tabular form.A PK is what it is, so if I understand you correctly, you cannot do that.
    Jeff

  • FillSchema picks too many primary key columns

    I don't know whether this is an ODP.NET error or a Microsoft error.
    Oracle9i Release 9.2.0.1.0
    ODP.NET 9.2.0.4
    .NET Framework 1.1
    Create a table with one primary key column and one unique column and name the primary key column like the unique column with the suffix "_ID":
    CREATE TABLE t_bib_uebertrag_kap(
    &nbsp kapazitaet_id NUMBER(8) NOT NULL
    &nbsp&nbsp CONSTRAINT pk_kapa primary key,
    &nbsp kapazitaet VARCHAR2(15) NOT NULL
    &nbsp&nbsp CONSTRAINT a_un_kapa unique,
    &nbsp geschwindigkeit NUMBER(12) NOT NULL,
    &nbsp bemerkung VARCHAR2(255)
    After calling FillSchema on this table the PrimaryKey property of the DataTable contains 2 columns: KAPAZITAET_ID and KAPAZITAET.
    The same happens with other tables and similar column names
    R. Lüthke

    Tony, I'm gonna find time to try this because I was thinking it probably would be a double check.
    BUT... Oracle is written in C, and I imagine the extra check as a simple if comparison for the new value versus a constant NULL value. Kind of like checking for end of string. It's already doing things like checking datatypes and that as it inserts data, and I don't think this additional check (if it even exists) would add any significant overhead.
    But unless I find a much larger performance hit than I expect, I'm gonna stick with creating the NOT NULL's explicitly. Good data modelling trumps small performance tricks for me.
    My main worry is if/when somebody removes the primary key constraint (such as the example above where they might do a CREATE TABLE x AS SELECT * FROM y). Or if the data model gets updated to where the primary key becomes just a unique key, then the NOT NULL goes away when it shouldn't. I don't like basic table and column properties changing.
    Okay.. test done. Ran about 31,000 records from dba_tables through an insert into two tables, both with primary keys and one with explicit NOT NULLs. No measurable difference in stats detected.
    With NOT NULL and PRIMARY KEY:
    call count cpu elapsed disk query current rows
    Parse 1 0.35 0.35 0 0 0 0
    Execute 1 1.88 1.83 0 24792 35887 30954
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 2.24 2.18 0 24792 35887 30954
    Now with only PRIMARY KEY.
    call count cpu elapsed disk query current rows
    Parse 1 0.37 0.36 0 0 0 0
    Execute 1 1.87 1.83 0 24792 35887 30954
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 2.24 2.19 0 24792 35887 30954

Maybe you are looking for

  • Excel import fails when Excel file selected

    SQLDeveloper version 1.2.0 I right-click on the table, select Import, select the Excel workbook, then I get this: org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance, the following exception occured: null      at org

  • Business Objects Core Dumps

    Hi, We are experiencing problems with Business Objects, in the past, from time to time we were required to re-start BO because BO was crashing. But, now this is happening more regularly, almost daily. We have reports that take 12 hours approx. to com

  • Windows System Menu JNI?

    I have an application that when running on a mac supplies an NSApplication delegate that provides a dock menu. I would like to do the same thing for Windows. Ideally, this means I'd like a class that has a method that takes a JMenu and proxies its me

  • App Store sorting reviews

    Have to agree with most people that the new App Store layout it horrible. How do you sort the order of the reviews?  They seem to me to be in no logical order and I want them in date order.

  • HT3702 Why is my credit card being charged regularly when I have a credit balance that more than covers a purchase.

    My are keeps getting charged even though I have a credit balance on my account from a gift card.?