Help for inserting/updating new record

hi,
i am trying to insert new data in account record in CRM OD from java using (web service v2.0 ) following methods
AccountInsertInput accountinsert=new AccountInsertInput();
accountinsert.setListOfAccount(accountDataList);
Here accountDataList is object of ListOfAccountData.......i want to know how can i insert data in accountDataList that is passed as argument....what i think is that i can create object of AccountData and set required values then convert this to ListOfAccountData(which i am not sure if possible)....pls help
there is one more problem while updating i am getting ...."No user key can be used for the Integration Component instance 'Account'."....however i have given the combination of user keys....i don't have accountid so i have just given id .....pls help

Hi,
there is one more problem while updating i am getting ...."No user key can be used for the Integration Component instance 'Account'."....however i have given the combination of user keys....i don't have accountid so i have just given id .....pls helpPlease ensure that a record exists in CRM On Demand corresponding to the user key values you are providing. This error indicates that no record can be found matching the specified user key.
Thanks,
Sean

Similar Messages

  • Newbie - Insert/Update Sql Records

    Is there a good overview available somewhere that I can see the code necessary to insert/ update MSSql records? The selects and data vieing is simple, just need the next step.
    Tx

    Hi there,
    I searched for information about inserting SQL records, too, but did not find a concrete example. There are code samples regarding updating records at:
    http://developers.sun.com/prodtech/javatools/jscreator/reference/codesamples/index.html
    After all I managed to create new data records using this code:
    1. In the constructor of the page:
    // User provided initialization code
    testRowSet.setAutoCommit(true);
    testRowSet.setHoldability(testRowSet.HOLD_CURSORS_OVER_COMMIT);
    testRowSet.setConcurrency(testRowSet.CONCUR_UPDATABLE);
    testRowSet.execute();
    2. Action handler of the submit button:
    public String button1_action() {
    // Add your event code here...
    try {
    String a = (String)textField1.getValue();
    String b = (String)textField2.getValue();
    System.out.println("Werte a + b: "+a+" + "+b);
    testRowSet.moveToInsertRow();
    testRowSet.updateString(1, a);
    testRowSet.updateString(2, b);
    System.out.println("inner Action");
    testRowSet.insertRow();
    return "success";
    catch ( SQLException e) {
    log("speicherfehler", e);
    throw new FacesException(e);
    Because I just worked this out 30 minutes ago, there is still some debug code in it (you noticed that probably) and I do not know if this is the somehow "official" solution for the task, furthermore there might be code that is not necessary.
    Hope this helps
    Bernd

  • ADF: any good examples on inserting a new record

    Hi, I'm currently developing a
    web based application (using jsp + struts on top of ADF)
    and I've seen many many demos and viewlets on
    how to create a page that reads a list of employees
    or master-detail relationship of records.
    However, when I try to make a page which can insert
    a new record (ex. new employee, new department, etc),
    I am baffled, because I couldn't find a good example
    that showed me how to do it.
    Has anyone have a good example?
    thank you.

    Did you check the tutorials page?
    For example:
    http://otn.oracle.com/products/jdev/collateral/tutorials/9050/bizcomp_jsp_tut.html

  • What's the best way to insert/update thousands records in multiple tables

    Can anyone give an example of how to insert/update thousands records in multiple tables on performance wise? or what should I do to improve the performance?
    Thanks
    jim

    You can see a set of sample applications in various scenarious available at
    http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/content.html

  • Insert a new record in the database table in between the records.

    i va a database table which ve 100 records. but i want to insert my new record  as 50th record. how i want to  proceed?
    thanks ,
    velu.

    V,
    This is an odd request.  Why?
    Ignoring that, you can ATTEMPT to insert into the 50th position IF:
    1) The DB table has just had the primary key index re-built/re-shuffled to GUARANTEE that it IS in primary key order
    2) And the primary key of the new record is built so that it follows the 49th record
    Regardless, once this table has activity against it, its sort order can/will get out of promary key order (with adds/changes/deletes). 
    But when you select data from it, you can use ORDER BY or an ABAP SORT to organzie the date as needed.
    Again... not sure WHY you need a record in a particular physical position... who cares... it is a relational DB.

  • As i am fresher Please share the doc of ECMA script using java script in SharePoint 2013 also how we can insert,update,delete records in list using ECMA script.

    As i am fresher Please share the doc of ECMA script using java script in SharePoint 2013 step by step also how we can insert,update,delete records in list using ECMA script.
    Thanks and Regards, Rangnath Mali

    Hi,
    According to your post, my understanding is that you want to use JavaScript to work with SharePoint list.
    To create list items, we can create a ListItemCreationInformation object, set its properties, and pass it as parameter to the addItem(parameters) function
    of the List object.
    To set list item properties, we can use a column indexer to make an assignment, and call the update() function so that changes will take effect when you callexecuteQueryAsync(succeededCallback,
    failedCallback). 
    And to delete a list item, call the deleteObject() function on the object. 
    There is an MSDN article about the details steps of this topic, you can have a look at it.
    How to: Create, Update, and Delete List Items Using JavaScript
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Help!! Updated new version of iTunes but I can't open it

    Help!! Updated new version of iTunes but I can't open it nw. It pop up a window said: [the file "iTunes Library.it" cannot be read because it was created by a newer version of iTunes. ] what is it?Tried to remove and install old version iTunes also can't work..

    Manually download from here and install http://support.apple.com/downloads/#

  • Automatic insertion of new record.....help......

    i have done insertion of 6 field in the database..which is working good(code is below)...Now i want to do stuff that when i insert 6 field in database, then a new record also has to be insert into the database, in that new record the following changes should be done.
    1)if i insert field code no ex.. 20 is inserted into the database then the a new code no 120 should be generated and inserted into database (the new code no should be started with 1, then the orginal code no will come) ex.. 10=101, 11=111, 256=1256,257=1257. The bold part is orginal record entered by the user, and the new record isnot bold.
    2)Percentage field is there,ex 12%, 13% etc values will come , it calculates the percentage of credit amount field values and insert that values into the debit amount field of new record.
    In my following code the code no is displayed as code, debit amount is shown as DrAmount, credit amount is shown as CrAmount, percentage field is shown as pct.
    conn.setAutoCommit(false);
    PreparedStatement pstmt = conn.prepareStatement("INSERT INTO gl_mast VALUES (?, ?, ?, ?, ?, ?)");
    for (int i=1; request.getParameter((i==1)?"code":("code_" +i)) != null; i++){
    String Code1=request.getParameter((i==1)?"code":("code_" +i));
    int Code=Integer.parseInt(request.getParameter((i==1)?"code":("code_" +i)));
    pstmt.setInt(1,Code);
    String Description=request.getParameter((i==1)?"Description":("Description_" +i));
    pstmt.setString(2,Description);
    float Dr_Amt =Float.parseFloat(request.getParameter((i==1)?"DrAmount":("DrAmount_" +i)));
    pstmt.setFloat(3,Dr_Amt );
    float Cr_Amt =Float.parseFloat(request.getParameter((i==1)?"CrAmount":("CrAmount_" +i)));
    pstmt.setFloat(4,Cr_Amt);
    String Type =request.getParameter((i==1)?"type":("type_" +i));
    pstmt.setString(5,Type );
    float Pct =Float.parseFloat(request.getParameter((i==1)?"pct":("pct_" +i)));
    pstmt.setFloat(6,Pct);
    pstmt.addBatch();
    conn.commit();
    conn.setAutoCommit(true);
    pstmt.executeBatch();plz...look at my code and solved my prob....
    thanx

    Whats Happening ..are u getting errors when u run thispage..what is the error..If I remember correctly...there was a similar post a couple of days ago from you....
    for (int i=1; request.getParameter((i==1)?"code":("code_" +i)) != null; i++){what is the above line of code doing..U cannot access the value of i as u have done above...why dont u use two ifs..to check the values..within the for...

  • HELP NEEDED: Use a new record for a customized table as a workflow trigger

    Hi SAP Workflow Gurus,
    Good day!
    One of our requirements is to have the creation of a new record in a custom database table trigger a workflow. I read and followed the steps as indicated in this link
    http://www.****************/Tutorials/Workflow/Table/events.htm
    As a summary, here is what I did:
    1. Created a subroutine for the custom table ZPA2003 for the create event
    2. Defined this event as a trigger for the custom workflow WS90000019
    3. Maintained and activated the event linkage via SWETYPV
    Basically I tried following the instructions indicated on the link
    Note that the entries for the custom table are created via a function module.
    Now during testing of the workflow, the system was able to complete the notification message. However, when I triggered the event via creation of the entry in the custom db table nothing happened
    1. Is there a way to debug/find out whether the link between the subroutine in the table and event itself are connected?
    2. I also tried running the event trace to check the activities executed but found nothing.
    Can you guys help me check on what I may have missed out?
    Regards,

    Hi All,
    Basically these are the requirements for the work schedule substitution:
    1. Employee enters the request via ESS (custom portal transaction)
    2. Upon saving of the entry (request) in a custom  table, this should trigger the workflow at the backend
    3. The Manager should then receive a work item in his Universal Worklist at the MSS side of the portal
    4. Upon clicking on the work item, a new screen will pop up showing the work schedule substitution details as well as an interface which will allow him to enter his/her usage decision
    5. Depending on the decision, the workflow must execute the necessary notifications as well as changes in the custom and PA2003 tables
    Now, we have accomplished step 1 and I am currently in the process for step 2. Now I have some queries:
    1. For the Manager to view and approve the substitution details, I used two methods for each process (view and approve) since our ABAPer mentioned that this cannot be done in 1 function module. Is there a way to simplify this step or is it really valid that they need to be executed in 2 different methods?
    2. As per our ABAPer, function Modules only import and export variables; they do not have the facility of say having tags on the details being displayed. Hence, if the details are 10001 (Employee Number), 10/20/2011 (Start Date), 10/25/2011 (End Date) the output would be 10001, 10/20/2011, 10/25/2011. Is there a way within the function module (or dynpro interface) to show it like this: Employee Number: 10001
                               Start Date: 10/20/2011
                               End Date: 10/25/2011
    3.  Speaking of dynpro applications, do I need to still develop one to allow the Manager to view and approve/reject the request via the MSS portal upon accessing the work item via the UWL? How would the work item go about calling the dynpro application? or is this even possible?
    It would have been easier if the facility would not pass through workflows since it will be just direct web dynpro/ABAP calls. Having to include it as a work item in the UWL puts a certain twist to it
    Your inputs are well-appreciated.
    Regards,

  • How to insert a new record to table with foreign key

    I have 3 tables like this :
    CREATE TABLE PERSON (
    PK INTEGER NOT NULL,
    NAME VARCHAR(10),
    SSNUM INTEGER,
    MGR INTEGER);
    ALTER TABLE PERSON ADD CONSTRAINT PK_PERSON PRIMARY KEY (PK);
    ALTER TABLE PERSON ADD CONSTRAINT FK_PERSON FOREIGN KEY (MGR) REFERENCES
    PERSON (PK);
    /* Tables
    CREATE TABLE PROJECT (
    PK INTEGER NOT NULL,
    CODE_NAME INTEGER);
    ALTER TABLE PROJECT ADD CONSTRAINT PK_PROJECT PRIMARY KEY (PK);
    /* Tables
    CREATE TABLE XREF (
    PERSON INTEGER NOT NULL,
    PROJECT INTEGER NOT NULL);
    ALTER TABLE XREF ADD CONSTRAINT PK_XREF PRIMARY KEY (PERSON, PROJECT);
    ALTER TABLE XREF ADD CONSTRAINT FK_XREF1 FOREIGN KEY (PERSON) REFERENCES
    PERSON (PK);
    ALTER TABLE XREF ADD CONSTRAINT FK_XREF2 FOREIGN KEY (PROJECT) REFERENCES
    PROJECT (PK);
    I do like the way of "ReverseTutoral" and the file .jdo here :
    <?xml version="1.0" encoding="UTF-8"?>
    <jdo>
    <package name="reversetutorial">
    <class name="Person" objectid-class="PersonId">
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="table" value="PERSON"/>
    <field name="name">
    <extension vendor-name="kodo" key="data-column"
    value="NAME"/>
    </field>
    <field name="person">
    <extension vendor-name="kodo" key="pk-data-column"
    value="MGR"/>
    </field>
    <field name="persons">
    <collection element-type="Person"/>
    <extension vendor-name="kodo" key="inverse"
    value="person"/>
    <extension vendor-name="kodo" key="inverse-owner"
    value="person"/>
    </field>
    <field name="pk" primary-key="true">
    <extension vendor-name="kodo" key="data-column"
    value="PK"/>
    </field>
    <field name="ssnum">
    <extension vendor-name="kodo" key="data-column"
    value="SSNUM"/>
    </field>
    <field name="xrefs">
    <collection element-type="Xref"/>
    <extension vendor-name="kodo" key="inverse"
    value="person"/>
    <extension vendor-name="kodo" key="inverse-owner"
    value="person"/>
    </field>
    </class>
    <class name="Project" objectid-class="ProjectId">
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="table" value="PROJECT"/>
    <field name="codeName">
    <extension vendor-name="kodo" key="data-column"
    value="CODE_NAME"/>
    </field>
    <field name="pk" primary-key="true">
    <extension vendor-name="kodo" key="data-column"
    value="PK"/>
    </field>
    <field name="xrefs">
    <collection element-type="Xref"/>
    <extension vendor-name="kodo" key="inverse"
    value="project"/>
    <extension vendor-name="kodo" key="inverse-owner"
    value="project"/>
    </field>
    </class>
    <class name="Xref" objectid-class="XrefId">
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="table" value="XREF"/>
    <field name="person">
    <extension vendor-name="kodo" key="pk-data-column"
    value="PERSON"/>
    </field>
    <field name="person2" primary-key="true">
    <extension vendor-name="kodo" key="data-column"
    value="PERSON"/>
    </field>
    <field name="project">
    <extension vendor-name="kodo" key="pk-data-column"
    value="PROJECT"/>
    </field>
    <field name="project2" primary-key="true">
    <extension vendor-name="kodo" key="data-column"
    value="PROJECT"/>
    </field>
    </class>
    </package>
    </jdo>
    Data of those tables are :
    PERSON :
    | PK | NAME | SSNUM | MGR |
    | 1 | ABC | 1 | 1 |
    | 2 | DEF | 5 | 1 |
    PROJECT
    | PK | CODE_NAME |
    | 1 | 12 |
    | 2 | 13 |
    And now I want to add a new record into table XREF : insert into XREF
    values (1,1);
    public void createData() {
    Xref xref = new Xref();
    Person person = new Person(1);
    Project project = new Project(1);
    xref.setPerson(person);
    xref.setProject(project);
    person.getXrefs().add(xref);
    person.getXrefs().add(xref);
    pm.currentTransaction().begin();
    pm.makePersistent(xref);
    pm.currentTransaction().commit();
    I don't know why Kodo automatically insert new record to table PERSON ->
    confilct Primary Key. The errors are :
    0 [main] INFO kodo.Runtime - Starting Kodo JDO version 2.4.1
    (kodojdo-2.4.1-20030126-1556) with capabilities: [Enterprise Edition
    Features, Standard Edition Features, Lite Edition Features, Evaluation
    License, Query Extensions, Datacache Plug-in, Statement Batching, Global
    Transactions, Developer Tools, Custom Database Dictionaries, Enterprise
    Databases, Custom ClassMappings, Custom ResultObjectProviders]
    41 [main] WARN kodo.Runtime - WARNING: Kodo JDO Evaluation expires in 29
    days. Please contact [email protected] for information on extending
    your evaluation period or purchasing a license.
    1627 [main] INFO kodo.MetaData -
    com.solarmetric.kodo.meta.JDOMetaDataParser@e28b9: parsing source:
    file:/D:/AN/Test/classes/reversetutorial/reversetutorial.jdo
    3092 [main] INFO jdbc.JDBC - [ C:23387093; T:19356985; D:10268916 ] open:
    jdbc:firebirdsql:localhost/3050:D:/An/test/temp.gdb (sysdba)
    3325 [main] INFO jdbc.JDBC - [ C:23387093; T:19356985; D:10268916 ]
    close:
    com.solarmetric.datasource.PoolConnection@164dbd5[[requests=0;size=0;max=70;hits=0;created=0;redundant=0;overflow=0;new=0;leaked=0;unavailable=0]]
    3335 [main] INFO jdbc.JDBC - [ C:23387093; T:19356985; D:10268916 ] close
    connection
    3648 [main] INFO jdbc.JDBC - Using dictionary class
    "com.solarmetric.kodo.impl.jdbc.schema.dict.InterbaseDictionary" to
    connect to "Firebird" (version "__WI-V6.2.972 Firebird 1.0.3)WI-V6.2.972
    Firebird 1.0.3/tcp (annm)/P10") with JDBC driver "firebirdsql jca/jdbc
    resource adapter" (version "0.1")
    4032 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ] open:
    jdbc:firebirdsql:localhost/3050:D:/An/test/temp.gdb (sysdba)
    4143 [main] INFO jdbc.SQL - [ C:25657668; T:19356985; D:10268916 ]
    preparing statement <3098834>: INSERT INTO XREF(PERSON, PROJECT) VALUES
    4224 [main] INFO jdbc.SQL - [ C:25657668; T:19356985; D:10268916 ]
    executing statement <3098834>: [reused=1;params={(int)1,(int)1}]
    4244 [main] INFO jdbc.SQL - [ C:25657668; T:19356985; D:10268916 ]
    preparing statement <9090824>: INSERT INTO PERSON(MGR, NAME, PK, SSNUM)
    VALUES (?, ?, ?, ?)
    4315 [main] INFO jdbc.SQL - [ C:25657668; T:19356985; D:10268916 ]
    executing statement <9090824>: [reused=1;params={null,null,(int)1,(int)0}]
    4598 [main] WARN jdbc.JDBC - java.sql.SQLWarning: java.sql.SQLWarning:
    resultSetType or resultSetConcurrency changed
    4598 [main] WARN jdbc.JDBC - java.sql.SQLWarning: java.sql.SQLWarning:
    resultSetType or resultSetConcurrency changed
    4598 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ] begin
    rollback
    4608 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ] end
    rollback 10ms
    4628 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ]
    close:
    com.solarmetric.datasource.PoolConnection@1878144[[requests=2;size=2;max=70;hits=0;created=2;redundant=0;overflow=0;new=2;leaked=0;unavailable=0]]
    4628 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ] close
    connection
    javax.jdo.JDOFatalDataStoreException:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    [SQL=INSERT INTO PERSON(MGR, NAME, PK, SSNUM) VALUES (null, null, 1, 0)]
    [PRE=INSERT INTO PERSON(MGR, NAME, PK, SSNUM) VALUES (?, ?, ?, ?)]
    GDS Exception. violation of PRIMARY or UNIQUE KEY constraint "PK_PERSON"
    on table "PERSON" [code=335544665;state=null]
    NestedThrowables:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    [SQL=INSERT INTO PERSON(MGR, NAME, PK, SSNUM) VALUES (null, null, 1, 0)]
    [PRE=INSERT INTO PERSON(MGR, NAME, PK, SSNUM) VALUES (?, ?, ?, ?)]
    GDS Exception. violation of PRIMARY or UNIQUE KEY constraint "PK_PERSON"
    on table "PERSON"
    at
    com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwFatal(SQLExceptions.java:17)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:416)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:575)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:438)
    at reversetutorial.Finder.createData(Finder.java:74)
    at reversetutorial.Finder.main(Finder.java:141)
    NestedThrowablesStackTrace:
    org.firebirdsql.jdbc.FBSQLException: GDS Exception. violation of PRIMARY
    or UNIQUE KEY constraint "PK_PERSON" on table "PERSON"
    at
    org.firebirdsql.jdbc.FBPreparedStatement.internalExecute(FBPreparedStatement.java:425)
    at
    org.firebirdsql.jdbc.FBPreparedStatement.executeUpdate(FBPreparedStatement.java:136)
    at
    com.solarmetric.datasource.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:111)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatementNonBatch(SQLExecutionManagerImpl.java:542)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatement(SQLExecutionManagerImpl.java:511
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeInternal(SQLExecutionManagerImpl.java:405)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.flush(SQLExecutionManagerImpl.java:272
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:411)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:575)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:438)
    at reversetutorial.Finder.createData(Finder.java:74)
    at reversetutorial.Finder.main(Finder.java:141)
    at org.firebirdsql.gds.GDSException: violation of PRIMARY or UNIQUE KEY
    constraint "PK_PERSON" on table "PERSON
    at org.firebirdsql.jgds.GDS_Impl.readStatusVector(GDS_Impl.java:1683)
    at org.firebirdsql.jgds.GDS_Impl.receiveResponse(GDS_Impl.java:1636)
    at org.firebirdsql.jgds.GDS_Impl.isc_dsql_execute2(GDS_Impl.java:865)
    at
    org.firebirdsql.jca.FBManagedConnection.executeStatement(FBManagedConnection.java:782)
    at
    org.firebirdsql.jdbc.FBConnection.executeStatement(FBConnection.java:1072)
    at
    org.firebirdsql.jdbc.FBPreparedStatement.internalExecute(FBPreparedStatement.java:420)
    at
    org.firebirdsql.jdbc.FBPreparedStatement.executeUpdate(FBPreparedStatement.java:136)
    at
    com.solarmetric.datasource.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:111)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatementNonBatch(SQLExecutionManagerImpl.java:542)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatement(SQLExecutionManagerImpl.java:511)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeInternal(SQLExecutionManagerImpl.java:405)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.flush(SQLExecutionManagerImpl.java:272)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:411)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:575)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:438)
    at reversetutorial.Finder.createData(Finder.java:74)
    at reversetutorial.Finder.main(Finder.java:141)
    Exception in thread "main"

    First off, use the '-primaryKeyOnJoin true' flag when running the reverse
    mapping tool so that you can get rid of that useless Xref class and have
    a direct relation between Person and Project. See the documentation on
    reverse mapping tool options here:
    http://www.solarmetric.com/Software/Documentation/latest/docs/ref_guide_pc_reverse.html
    But your real problem is that you are creating new objects, assigning
    primary key values, and expecting them to represent existing objects.
    That's not the way JDO works. If you want to set relations to existing
    objects in JDO, you use the PM to look up those objects. If you try to
    create new objects, JDO will assume you want to insert new records into
    the DB, and you'll get PK conflicts like you see here.
    There are several good books out on JDO; if you're just starting out with
    it, they might save you a lot of time and help you master JDO quickly.

  • Search criteria for insert/update bdoc

    Hi All,
    In our set up we have ecc to crm replication of BP. If one goes and checks the extension data of a stuck bdoc it has an Object Task- Insert or Update.
    Can someone help me with search criteria so that i can pull out bdocs which have an Insert as the Object task ??
    We have search criteria for errored/intermediate state bdocs; for inbound vs outbound; bdoc type etc etc..
    Need one based on Insert/Update Task so that any new data replication if stuck with its very first bdoc( Insert type) can be immediately queried.
    Regards
    Abhinav

    Hello Abhinav,
    I do not think that we have such a search criteria to search for BDocs based on the Task Type, which comes under the
    data part of the BDoc.
    One alternative way is to find out in which table these data gets stored and write a program to fetch the revelent Bdocs.
    Hope thisl helps!
    Best Regards,
    Shanthala Kudva

  • Update new record in database table

    I'm working with TestStand 4.2 and MySQL database with user-defined tables.
    There is "test_results" table with autoincrement "id" (primary index).
    I want to:
    1. write a new record to the test_results table - some data and status "Running"
    2. run a test (pass to a test sequence its "id", test uses this id for writing data to database)
    3. update the record: set execution time and update status.
    So, the steps are as below:
    1. Open database
    2. Open SQL statement: "select * from test_results".
    3. Data Operation: operation - "Set and Put", record to operate on - "New - Create New Record". In the "Column/Parameter Values" tab I set the new record values.
    Here I want to retrieve the new record "id". How to do it?
    Thanks in advance.

    I am not sure how to implement this in Test Stand, but from an SQL programming perspective, you want to run:
    SELECT @@IDENTITY
    Here is a link to the description:  http://msdn.microsoft.com/en-us/library/ms187342.aspx
    It will retrieve the record ID of the row you just inserted.

  • CQCs for inserts/updates only where newValue != oldValue?

    I want two producer apps placing identical data in my cache for redundancy but I don't want listeners advised twice of the insert/update. Is there a way so CQCs only receive events if the data put in the cache is different than the existing value?
    Thanks,
    Andrew

    Hello Andrew,
    I think what you would want to use is the [ MapEventTransformer|http://download.oracle.com/otn_hosted_doc/coherence/350/].
    If you compare the new and the old value and they are the same then return null which will not send the event.
    Hope that helps,
    -Dave

  • Update New Record

    T1::
    C1
    C2
    C3
    T1
    C1   C2    C3
    A    100   1
    A    108   2
    B    104   1
    B    106   2
    Insert New record
    Insert Into T1(C1,C2,C3)
    Values(A,105,NULL);
    Insert Into T2(C1,C2,C3)
    Values(A,105,NULL);
    Declare
    Begin
    For i in (select T1.C1 from T1,T2 Where T1.C1=T2.C1)
    Loop
    Update T1
    Set C3=(Seelct Rn From
    select ROW_NUMBER() OVER(Partition By C1 oder by C2 ) Rn from T1 where 1=i.C1
    Where C1=i.C1
    And C2=i.C2;
    End loop;
    End;
    Is this update correct to make above sample data to
    T1
    C1   C2    C3
    A    105   1         ---------------------> Inserted New Updated with 1
    A    100   2         ---------------------> Old with C3=1 Now C3=2
    A    108   3
    B    104   1
    B    106   2

    Or for the update part, you could do this:
    update t1 set c3=(case when c3 is not null then c3+1
                            when c3 is null then 1 end)
              where c1 =:c1;You are 'oder by C2' while C2 is not really in the order (105, 100, 108).
    Here is the detail:
    create table t1 (c1 varchar2(1), c2 number(3), c3 number(3));
    insert into t1 values ('A',100, 1);
    insert into t1 values ('A',105, NULL);
    insert into t1 values ('A',108, 2);
    insert into t1 values ('B',104, 1);
    insert into t1 values ('B',106, 2);
    insert into t1 values ('B',110, null);
    CREATE OR REPLACE PROCEDURE TEST AS
      CURSOR c1
      IS
        SELECT DISTINCT C1 FROM T1;
    BEGIN
      FOR item IN c1
      LOOP
        UPDATE t1
        SET c3=(
          CASE
            WHEN c3 IS NOT NULL
            THEN c3+1
            WHEN c3 IS NULL
            THEN 1
          end)
        WHERE c1 =item.C1;
      END LOOP;
    END TEST;
    select * from T1 ORDER BY C1, C3;
    A     105     1
    A     100     2
    A     108     3
    B     110     1
    B     104     2
    B     106     3Edited by: PhoenixBai on Aug 30, 2010 12:47 PM

  • HELP! ISSUE UPDATING DATABASE RECORDS

    Hi All
    Thank you for looking at my post.
    I have a form which interacts with a SQL database.
    The process starts with one member of the team partially completing the form and submitting this.
    xfa.sourceSet.DataConnection.addnew(); on form initiaise function
    then
    xfa.sourceSet.DataConnection.update(); on the submit button.
    This process works great.
    The next member of the team then gets the information by entering the requirement in two textboxes.
    var nIndex = 0;
    while(xfa.sourceSet.nodes.item(nIndex).name != "DataConnection")
    nIndex++;
    var oDB = xfa.sourceSet.nodes.item(nIndex).clone(1);
    oDB.nodes.item(1).query.setAttribute("text", "commandType");
    oDB.nodes.item(1).query.select.nodes.item(0).value = "Select * from repairform where (A4 = '" + TextField11.rawValue + "') & (A5 = '" + TextField12.rawValue + "')";
    oDB.open();
    oDB.close();
    This then populates the form with the record relating to the search term including the partially completed information from the previous team member.
    The user then poplulates the rest of the form and suibmits
    xfa.sourceSet.DataConnection.update();
    This is where is fall down....
    On the final submission the form seems to update first record in the database not the one that is currently showing.
    I am relatively new to this so it may be me doing something stupid.
    Please help.

    Hi Paul
    Sorry, I now understand the global sripting
    My only issue now is updating the record.
    I can get the form to grab the information using the global variable
    I am just not sure how to update the record as xfa.sourceSet.DataConnection.update(); does not work (well it still updates the first record).
    Do I still have to close the oDB from the first call to grab the specific record and then re-open odb when I want to update or leave it open the whole time?
    Do I have to create an SQL command (such as the select command given when searching for a record) to update the records manually?
    e.g. UPDATE formname SET etc etc
    as this would be a long process with 122 data fields.
    any thoughts to finish this process off would be greatly appreciated.

Maybe you are looking for

  • How to determine the database driver a report uses?

    Hello experts.  I'm using Crystal Report XI R2 and C# (.net 4.0 runtime). For a given report, I'd like programmatically determine what database driver(s) a report and it's sub-reports use.  The nice thing is that I don't want to change it. When I ref

  • Software Update keeps timing out on QuickTime 7.1.6

    Three different Macs (MacBook, MacBook Pro, iMac PPC) all with the same problem. Software updater times out, downloading directly from apple.com has the same problem. Updater downloads other updates, can download Quicktime for Windows with no issues.

  • Is there any way to sync to Linux

    Is there anyway to sync the Playbook on my Linux machine? Anyway to mount it over wifi? Is there a way to upload/download files to/from the Playbook to Linux? How can i transfer media from Linux to the Playbook? My Blog & Twitter My Apps: AppleCatch,

  • Where is the Amazon Instant Video file???

    I purchased and downloaded an Amazon Instant Video to an iPad 2 (iOS 8.1.2).  I can't figure out where the file is stored on the device.  How do I find it?

  • 10g DB migration

    Hi Every one, i have oracle 10g 64 bit database on win2003 paltform, and no i want to downgrade it to 32 bit. i can use it on my winXP laptop. Is it possible, if yes tell me how. Thanks