How to set primary key of the VO.

I have a problem with the master detail search. The search works fine on the first search, all details can be seen fine, but in the second search I get this error.
The number of displayed records, 1, exceeds the actual number of records, 0, in view object EgoItemAdvancedSearchAM.MYACCESSOR001_MYLINK001_DetailsOrderLinesVO. Some of the displayed records may have been deleted.
Somwhere in another thread, someone had the same problem and the soultion was to set primary key of the master VO. I am not sure how to set primary key of a VO. In my case the master VO is dynamic. Is there a way I can set PK of a dynamic VO.
Any help greatly appreciated.

Hi
Thanks for your reply...
am seting the primary key to VO attribute in my controller(PR)...but its not mapping to the VO attribute..
OAAttachmentImageBean Ibean = (OAAttachmentImageBean)webBean.findChildRecursive("OpAttachments");
String[] pkvaule = {"ResAttribute15"};
Ibean.setPkColumns(pkvaule);
Regards
Harrrry

Similar Messages

  • How to set primary key for a date column

    hello experts .,
    i need to set primary key for a column consists of the datatype date. how to solve this..?

    1008318 wrote:
    its my personal need..then it is a very bad personal need. DATE is not an appropriate type to be using for a primary key, as it cannot be guaranteed to be unique, especially when inserting multiple rows at once.
    You would be better working to business needs and implementing correct technical solutions to those needs, than to just do things based on your personal needs.

  • Re:Primary Key in the UDO Table

    Hi All,
    In the UDO  table by default code is set as the primary key. How to set primary key for another field also?.
    Thanks in Advance.
    Regards,
    Madhavi

    Hi Madhavi,
    If you're getting the 'Other users are currently connected to the database' and the aren't any user connected to the company one of the following is happening:
    1. There's a Add-on that uses the DI API connected to the company;
    2. You have the SQL Management Studio opened and connected to the company DB;
    3. You any other application, like Crystal Reports, connected to the company DB.
    Close all other applications that may be the cause of the problem, and create the Key again.
    Regards,
    Vítor Vieira

  • How do you change the value of the primary key in the CMP?

    Hi,
    The cmp that I built has the phone as the Prikey field.
    The bean has the get/set methods. The servlet invokes the cmp
    to change the phone number. How could I do that?
    The setXXX for the priKey can not be called outside of the ejbCreate() so
    how would I change the prikey value of a particular row of the table. Do I have
    to remove the bean then create the new bean with the new priKey value?
    Please help,
    Thanks

    Thanks Mona
    Tom.
    Mona Ramlawi <[email protected]> wrote:
    Hi TOM,
    The primary key is the unique identifier of an Entity Bean.
    To change it, you have to remove the bean instance = database delete
    then you have to create a new one with the new primary-key value =
    database insert.
    Hard luck tom, maybe you should consider changing your primary key. You
    can easily change it to an AutoNum
    Tom wrote:
    Hi,
    The cmp that I built has the phone as the Prikey field.
    The bean has the get/set methods. The servlet invokes the cmp
    to change the phone number. How could I do that?
    The setXXX for the priKey can not be called outside of the ejbCreate()so
    how would I change the prikey value of a particular row of the table.Do I have
    to remove the bean then create the new bean with the new priKey value?
    Please help,
    Thanks

  • Anyone know setting primary key deferred help in the bulk loading

    Hi,
    Anyone know by setting primary key deferred help in the bulk loading in term of performance..cos i do not want to disable the index, cos when user query the existing records in the table, it will affect the search query.
    Thank You...

    In the Oracle 8.0 documentation when deferred constraints were introduced Oracle stated that defering testing the PK constraint until commit time was more efficient than testing each constraint at the time of insert.
    I have never tested this assertion.
    In order to create a deferred PK constraint the index used to support the PK must be created as non-unique.
    HTH -- Mark D Powell --

  • When I try to set up key chain the verification code phone number is wrong.  How do I correct this wrong number?

    When I try to set up key chain the device it is asking for verification has the wrong cell number.  How do I correct this?

    Follow this link ----> Get help using iCloud Keychain
    The first part of it goes over how to change the phone number. If you can't access the keychain because you do not have the code. You will need to reset the keychain.

  • How to get the new Primary Key after the Automatic Row Processing (DML)

    Hi,
    I have a nice master detail form.
    I want, immediately after submitting the page when creating a new record in the master table, that the user may input the associated table (the detail table). For that I have created a branch that goes back to the very same page after creating the record (ie submitting the page with the button Create). In the Action of the branch, i have put P30_FICHE_ID (the item containing the primary key of the master table) with its value : &P30_FICHE_ID.
    Unfortunately I see that the item is not populated with the very new primary key. it seems normal becaus after submitting the page the tiem is not populated. This is my question : how to retrieve the newly created primary into the item P30_FICHE_ID in order to begin immediately to add rows to the detail table ?
    Hope I'm clear. My english not perfect.
    Thank you for your kind help !
    Christian
    Edited by: Christian from France on Oct 16, 2009 6:36 AM

    Christian,
    After creating Master-detail form, goto your Detail page. In this page you can see one conditonal brach which will point to 'Master' page.
    Edit this branch and here you can see this branch fires when request is in 'SAVE,DELETE,CREATE' (in Expression1). Now change the value in Expression1 to 'SAVE,DELETE'. This will do the needful :-)
    Cheers
    Hari
    Edited by: Hari_639 on Oct 16, 2009 8:02 PM

  • How can i set primary key after creating a table ?

    hi friends
    thank you for all the support you have given me . i have doubt ,can we set primary key for a column after creating the table
    I have added a column named idno after creating the table . i want to set that column as primary key . i tried this
    table name = address
    column name = idno
    ALTER TABLE ADDRESS MODIFY (idno PRIMARY KEY(idno))
    ,but not working
    if anbody knows the solution pls reply
    thanks and regards
    nev

    how does the other users know which is the primary key for this table?....the other user needs to execute this query...and modify the query accordingly
    select aa.table_name,aa.column_name,aa.constraint_name,bb.constraint_type
    from user_cons_columns aa,user_constraints bb
    where aa.constraint_name = bb.constraint_name
    and aa.table_name = 'TEST_EMP' and bb.constraint_type = 'P';

  • How to get primary keys in some order with joins?

    Hi, I build BBS using BDB as backend database, forum database, topic database and post database share one environment. This BBS web application is multi-thread program. If user selects one forum, its topics will be listed in order of last reply time;selecting one topic, posts are listed in order of reply time as well.
    struct forum {
    UInt16 forumID;
    string forumName;
    string _lastPoster;      // who is the last one replied in this forum
    struct topic {
    UInt32 topicID;
    UInt16 forumID; // topic comes from this forum
    string title; // topic title
    UInt64 dateOfLastReply; // when last reply to this topic happen
    struct post {
    UInt64 postID;
    UInt32 topicID; // post comes from this topic
    string title; // post title as of topic
    UInt64 dateOfPost; // when this post is created
    I create one primary database and two secondary databases for topic, primary key is topicID, secondary key are forumID and dateOfLastReply respectively, and I want to show 1st 25 topics in latest reply time order on the 1st browser page, 2nd 25 topics on the 2nd browser page, and etc.
    if using SQL, it will be: SELECT topicID FROM topic WHERE forumID=xx ORDER BY dateOfLastReply DESC
    From performance perspective, I want get all topics id of one same forum, and need them come in reply time order, then retrieve topic one by one based on returned topicID, how can I do this? guess I have to use joins.
    Plus, do you have any suggestion about retrieval performance given the fact that topics retrieval will happen each time browser want to request the next page, that is, 2nd 25 topics of this forum?
    Is DB_DBT_MULTIPLE helpful to me?
    thanks.
    Edited by: tiplip on 2011-1-22 上午5:43
    Edited by: tiplip on 2011-1-22 下午5:52
    Edited by: tiplip on 2011-1-23 下午7:42

    Hi tiplip,
    Bellow I will describe how you can support "SELECT * FROM table WHERE X = key ORDER BY Y" queries using Berkeley DB, which, as you suspected, should be done by using a composite index.
    First of all, think of Berkeley DB as the storage engine underneath an RDBMS. In fact, Berkeley DB was the first "generic data storage library" implemented underneath MySQL. As such, Berkeley DB has API calls and access methods that can support any RDBMS query. However, since BDB is just a storage engine, your application has to provide the code that accesses the data store with an appropriate sequence of steps that will implement the behavior that you want.
    If you have two indices in SQL, each on a single column (call them X and Y), and you do:
    SELECT * FROM table WHERE X = key ORDER BY Y;then there are three plausible query plans:
    (1) scan the whole table, ignore both indices, filter by X = key then sort by Y;
    (2) use the index on Y to scan all rows in the required order, filter by X = key;
    (3) use the index on X, find the matching rows, then sort by Y.
    There are cases where (1) would be fastest, because it has all of the columns from one scan (the other query plans will do random lookups on the primary for each row). This assumes that the data can fit into memory and the sort is fast.
    Query plan (2) will be fastest if the selectivity is moderate to high, looking up rows in the main table is fast, and sorting the rows is very slow for some reason (e.g., some complex collation).
    Query plan (3) will be fastest if the selectivity is small (only a small percentage of the rows in the table matches). This should be the best case for us, making it the best choice in a Berkeley DB key/value application.
    The optimal plan would result from having a composite index on (X, Y), which can return just the desired rows in the desired order. Of course, it does cost additional time and space to maintain that index. But note that you could have this index instead of a simple index on X: it can be used in any query the simple index could be used in.
    Records in Berkeley DB are (key, value) pairs. Berkeley DB supports only a few logical operations on records. They are:
    * Insert a record in a table.
    * Delete a record from a table.
    * Find a record in a table by looking up its key.
    * Update a record that has already been found.
    Notice that Berkeley DB never operates on the value part of a record. Values are simply payload, to be stored with keys and reliably delivered back to the application on demand. Both keys and values can be arbitrary byte strings, either fixed-length or variable-length.
    So, in case of a "SELECT * FROM X WHERE id=Y ORDER BY Z" query, our suggestion, from Berkeley DB's point of view, would be for you to use a composite index (as it would be in SQL), where a string created as X_Y should do the trick, as explained in the following scenario.
    Primary:
        X Y
    1 10 abc
    2 10 aab
    3 20 bbc
    4 10 bba
    5 20 bac
    6 30 cbaSecondary:
    10_aab 2
    10_abc 1
    10_bba 4
    20_bac 5
    20_bbc 3
    30_cba 6If the query looks like this:
    'SELECT * FROM primarydb WHERE X = 10 ORDER by Y'the application can run a cursor on the secondary and begin the loop with the DB_SET_RANGE flag on 10. When iterating with DB_NEXT, this will return:
    2 10 aab
    1 10 abc
    4 10 bbcThe application must check for the end of the range inside the loop, in this case it should stop when it hits 20_bac.
    As in SQL, retrieving by a secondary key is remarkably similar to retrieving by a primary key and the Berkeley DB call will look similar to its primary equivalent.
    tiplip wrote:
    Plus, do you have any suggestion about retrieval performance given the fact that topics retrieval will happen each time browser want to request the next page, that is, 2nd 25 topics of this forum?As you are concerned about the performance, I think this would be the fastest solution. Of course, you can tune the performance at a later time, after you have the functionality in place. What I think you should do first is to increase the cache size and test with a bigger database page size, and maybe to configure the transactional subsystem (in case you use one).
    If you are not very familiar with how to implement the above in BDB, please read the Guide to Oracle Berkeley DB for SQL Developers, available at: http://www.oracle.com/technetwork/articles/seltzer-berkeleydb-sql-086752.html
    You will also need to be familiar with the following documentation:
    Related documentation pages:
    Secondary indexes - http://download.oracle.com/docs/cd/E17076_01/html/programmer_reference/am_second.html
    Cursor operations - http://download.oracle.com/docs/cd/E17076_01/html/programmer_reference/am_cursor.html#am_curget
    DBcursor->get() - http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/dbcget.html
    DB_SET_RANGE - http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/dbcget.html#dbcget_DB_SET_RANGE
    If my answer helps you with your question, please go ahead and rate it as Helpful or Correct, and the forum thread as answered. For each unrelated question, please create a new forum thread.
    Good luck with building your forum application,
    Bogdan Coman
    PS: If you are a BDB licensed customer, you can also use My Oracle Support (https://support.oracle.com) to visit the KM note 1210173.1, that discusses the same topic.

  • Setting primary key fields from sequence. Please advise

    What is the most logical place to automatically set primary key fields from
    sequence?
    jdoPrestore seems to be a little late - my instance will not have id till
    it's committed. I can not do it in constructor because it gets called every
    time Kodo needs to construct an instance. What other options do I have for
    automatic pk assignment except do it in my code (hate it)?
    I wish I could use store managed OIDs but I need access to OID underlying
    data
    Please also see my previous message "Application Identity Extention"

    I came up with following pattern:
    public class OrgUnit implements InstanceCallbacks {
    private long orgUnitId = -1;
    private transient long tempOrgUnitId = -1;
    public long getOrgUnitId() {
    if (orgUnitId < 0) {
    if (tempOrgUnitId < 0) {
    tempOrgUnitId = JDOFactory.getNextSequenceId(getClass());
    return tempOrgUnitId;
    } else {
    return orgUnitId;
    public void jdoPreStore() {
    if (!JDOHelper.isDeleted(this)) {
    if (orgUnitId < 0) {
    setOrgUnitId(getOrgUnitId());
    I use -1 as an indicator that ID has not been assigned yet. If you use Long
    instead of long it will be cleaner since we can test for null
    "Alex Roytman" <[email protected]> wrote in message
    news:9q27co$r35$[email protected]..
    What is the most logical place to automatically set primary key fieldsfrom
    sequence?
    jdoPrestore seems to be a little late - my instance will not have id till
    it's committed. I can not do it in constructor because it gets calledevery
    time Kodo needs to construct an instance. What other options do I have for
    automatic pk assignment except do it in my code (hate it)?
    I wish I could use store managed OIDs but I need access to OID underlying
    data
    Please also see my previous message "Application Identity Extention"

  • How to set Where clause in the View Object of the MessageChoice ?

    Hi,
    How to set Where clause in the View Object of the
    MessageChoice ?
    Example:
    <bc4j:rootAppModuleDef name="EdEscolaCampusView1AppModule"
    definition="ed00050.Ed00050Module"
    releaseMode="stateful" >
    <bc4j:viewObjectDef name="EdEscolaCampusView1" >
    <bc4j:rowDef name="CreateEdEscolaCampusView1" autoCreate="true" >
    <bc4j:propertyKey name="key" />
    </bc4j:rowDef>
    </bc4j:viewObjectDef>
    <bc4j:viewObjectDef name="ListaTipLocalView1"
    rangeSize="9999">
    </bc4j:viewObjectDef>
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    messageChoice declaration:
    <bc4j:messageChoice name="SeqTipoLocalCampus"
    attrName="SeqTipoLocalCampus"
    prompt="Local do Campus">
    <contents>
    <bc4j:optionList attrName="SeqTipoBasico"
    textAttrName="NomTipoBasico"
    voName="ListaTipLocalView1"/>
    </contents>
    </bc4j:messageChoice>
    I would like set where clause of ViewObject, with dinamic parameters (using attribute1 = :1), before populate messageChoice.
    thanks...
    Danilo

    Hi Andy,
    I try set a where clause using the message:
    Set where Clause parameter using UIX , but my UIX Page have 2 messageChoice's of different ViewObject's, then I need implement this Java Class:
    //Nome da Package da Tela Detail
    package br.com.siadem.siaed.ed00050;
    // Importa as Bibliotecas necessárias
    import oracle.jbo.ViewObject;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.client.Configuration;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.servlet.event.PageEvent;
    import oracle.cabo.servlet.event.EventResult;
    import oracle.cabo.data.jbo.servlet.bind.*;
    import oracle.cabo.ui.data.BoundValue;
    import oracle.cabo.ui.data.DataBoundValue;
    import javax.servlet.http.HttpServletRequest;
    import br.com.siadem.siaed.util.*;
    import javax.servlet.http.Cookie;
    import oracle.cabo.data.jbo.def.NestedAppModuleDef;
    import oracle.cabo.data.jbo.def.ViewObjectDef;
    import oracle.cabo.data.jbo.def.AppModuleDef;
    // Classe que configura os parametros para a execução da Query,
    // utilizando variáveis de Sessao
    public class FunPreQueryLista
    public static EventResult FunConfiguraQuery(BajaContext context, Page page, PageEvent event) throws Throwable
    // TrataDadosSessao - Classe utilizada para retornar os valores das variáveis de sessão genéricas
    // Ex: CodCliente, CodMunicipio etc...
    TrataDadosSessao varDadosSessao = new TrataDadosSessao();
    // 1o. Parametro Configurado - Através da classe TrataDadosSessao, utilizando um método Get
    // <alterar>
    String valor1 = varDadosSessao.getCodCliente();
    String valor2 = varDadosSessao.getCodMunicipio();
    //Cria o objeto que retorna o ApplicationModule
    ApplicationModule am = ServletBindingUtils.getApplicationModule(context);
    // Início das Configurações da Query da Lista
    //Cria o objeto que retorna o view object da lista desejada
    //alterar
    ViewObject TipoLocal = am.findViewObject("ListaTipoLocalView1");
    //Configuração dos parametros definidos na query do view Object
    //alterar
    TipoLocal.setWhereClauseParam(0,valor1);
    TipoLocal.setWhereClauseParam(1,valor2);
    // Executa a Query
    TipoLocal.executeQuery();
    // Fim das Configurações da Query da Lista
    // Início das Configurações da Query da Lista
    //Cria o objeto que retorna o view object da lista desejada
    //alterar
    ViewObject TipoDestLixo = am.findViewObject("ListaDestinoLixoView1");
    //Configuração dos parametros definidos na query do view Object
    //alterar
    TipoDestLixo.setWhereClauseParam(0,valor1);
    TipoDestLixo.setWhereClauseParam(1,valor2);
    // Executa a Query
    TipoDestLixo.executeQuery();
    // Fim das Configurações da Query da Lista
    // Retorna o Resultado para a Página
    return new EventResult(page);
    The code works very well...
    And, I'm sorry for my two repost's in UIX Forum about this in a few time.
    Thank very much...
    Danilo

  • How to set Shortcut keys for button in Apex

    Hi
    Could anyone help me on how to set shortcut keys for buttons in Apex.
    I need to use say ALT + S to submit the page.
    The following thread pertaining to HTML DB refered to use ACCESS key. but that couldnt work in my case.
    Re: operation of the app. with the keyboard
    Any pointers on achieving this would be helpful.
    Thanks
    Vijay

    Hi Vijay,
    I’m afraid you must do it using javascript key listener. You can’t use action() on template based buttons because they are actually not HTML buttons but images with hyperlink.
    Key listener checks which key has been pressed down and invoke some JS function. For example, write this code in page header:
    <script>
    document.onkeydown=keyCheck;
    function keyCheck(e){
         var KeyId = (window.event) ? event.keyCode : e.keyCode;
         switch(KeyId){         
              case 113:
                   doSubmit('SAVE');
                   break;                    
              case 118:
                   alert('Hello');
                   break;
    </script>
    This script will submit page with request 'SAVE' if you press F2 or will show alert message if you press F7. Modify it to your issue.
    Regards,
    Przemek

  • How to modify primary key column?

    I want to modify one primary key column, But TT reported error.
    How do I modify primary key column? Thanks first.

    In TimesTen, the values in primary key columns cannot be updated (except for the trivial case where you update the value to the same value as it currently has). If you want to change the values stored in primary key columns the application must insert a new row with the new key values (and of course values for the other columns) and then delete the old row.
    Chris

  • How to find Primary Key for a particular SAP Databse Table?

    Hi Guys,
                  How to find Primary Key and foreign key  for Particular SAP Databse table ?for Ex : EKKO , EKPO , EKKN , EKBE , EKBEH  , EKET and EKETH.
    Thanks,
    Srinivas.

    Use transaction SE11 to display the table. Put the cursor on the field you want to display the check table and click 'Foreign key' push button (a key with an bottom point arrow), then it will show the check table of the foreign of a field.
    Or by just simple double click on the field, a pop-up window of all the attribute (including the foreign key and the check table if exists) will show too.
    <i><b>Please reward point for helpful answer.</b></i>
    Minami

  • Hi All, I have question about the iMac operating system. I have the last updated. The problem when I manage the place of the folder windows they are all mixing up. I mean they not on the place where I left them. how to set they stay on the same place. Tks

    Hi All, I have question about the iMac operating system. I have the last updated. The problem when I manage the place of the folder windows they are all mixing up. I mean they not on the place where I left them. how to set they stay on the same place? I know there are different possibilities to set.
    I tried but it not helped for me. What I can do? How and where can set this they stay on their place?
    Thanks.
    laci

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In Library Manager it's the FIle -> Rebuild command)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. 
    Regards
    TD 

Maybe you are looking for

  • Deletion of Attachmet in Web UI

    Hi All, I  have a requirement where in i need to delete an attachment linked to Service ticket.. in the attachment view..there is no delete button..is there any way how to get the delete button.. Thanks for the inputs. Regards, Udaza

  • Login issues resolved...

    We believe we have found and resolved the login issues users have been experiencing. Please let us know if you are still having problems. Thank you for your patience. Brett L Apple Discussions Host

  • PCUI - CRM - Text (Field Label) Replacement

    Hi Friends, I want to change the Field Label displayed on the PCUI. In PCUI the field label displayed, is the value taken from the Medium Text of that field's respective Data Element in DDIC. Please correct me if I am wrong. Now for example - I want

  • HT4061 i am seeing the message 1015 what does this mean and how can I fix it?

    I am receiving a message 1015 what does this mean?

  • Mtp usb device failed

    failed to recognise my lumia 830.on my pc.I use windows 7 .No lumia boot mgr.finally says driver installation failed.help please.I bought my phone yesterday