Inserting inverted comma in constant

Hi
I have to include an inverted comma in text literal.
How to do this.
The text is  'MSD Int' l Services B.V.'
Note the comma after "int" in above text
if i declare like this
constants:c_1048_text TYPE char40 VALUE 'MSD Int' l Services B.V.'.
this is giving error.

Hi Ajay,
You can write (so 2 inverted commas):
constants:c_1048_text TYPE char40 VALUE 'MSD Int'' l Services B.V.'.
Regards,
John.

Similar Messages

  • How often have inverted commas in an inserted text to be doubled?

    Hello,
    if I want to insert a text into a string field and the text contains inverted commas, how often have these inverted commas to be doubled, to avoid inserting errors and to keep the original inverted commas after insertion?
    Example "this is a text to be inserted and it contains *'text in inverted commas'* and normal text" How has it to look to keep the single inverted commas in the the text after inserting it?
    Regards
    Carsten

    Use (a) the quote operator or (b) escape quotes.
    For the first case, assuming you're on 10g or higher, your example would be:
    Insert into tab1 values( q'{this is a text to be inserted and it contains 'text in inverted commas'}'); For the second case, simply add a single quote to escape another. Your example would be:
    Insert into tab1 values( 'this is a text to be inserted and it contains ''text in inverted commas'''); (Notice the trailing quote is the end-quote for the entire text.)
    Edited by: Sharma on Mar 21, 2011 4:26 PM

  • Inverted Comma database Problem

    Hi!
    I am using making n article management system
    using which i am storing articles in the form of HTML in the database.
    & it is working cool i am storing the data in database
    but when article have any inverted comma like this
    "here's the "preloaded content" "
    it gives error in the query execution i am using MySQL
    Please Help
    BuntyIndia

    When you concatinate the data to sql string the characters in the data can break the syntex. Thats what happerning
    Where is an example.
    Lets say that you have a document information in following in following variables
    Name of the document in "doc_name",
    Content in variable "doc_content"
    and you want to insert them in to table DOCUMENT_TAB
    and the JDBC connection is con
    PreparedStatement ps = con.prepareStatement("INSERT INTO document_tab (name,content) VALUES(?, ?)");
    ps.setString(1,doc_name);   //this will set the value for 1st '?'
    ps.setString(2,doc_content);   //this will set the value for 2nd '?'
    //now execute
    ps.executeUpdate();
    //close the statement
    ps.close();

  • Connecting to a custom network - NO INVERTED COMMA???!!!!

    I am currently trying to connect my iphone to my wireless network,
    The issue i am having it that i cannot seem to find the ` (inverted comma) button on the keyboard on the iphone??? is there a way to upload the network key to the phone and connect to the network like the e71??? what are my options here besides changing the network key as this is not feesable!!
    Thanks

    it's because osx doesn't have a default 'remote desktop' client.
    Go here:
    http://www.microsoft.com/mac/products/remote-desktop/default.mspx
    and you can download a remote desktop client for mac, and will look just like the one for windows. After that, come back here to see if we can help further.
    But if you're using it at home (not connecting your mac directly to your works network) then you would need some sort of secure way of connecting to the work network first. ie) cisco vpn client for mac (if they are using vpn). Do you have vpn token or mobikey?
    Message was edited by: Aunty June

  • Problem with inverted commas in texts in WAD

    Hi all,
    I've a problem with description texts in WAD. In a graph where one of the columns have the description, let's say something like ' bla"bla ' (in Hebrew we've texts with inverted commas in the middle of the word) and when I point with my mouse on the point to see the value in numbers the text is cut. let's say 'bla"bla' had 15 value it wouldn't show it, but it would show 'bla'. if the text is ' bla ' with value 18, it shows ' bla 18' .
    How can i solve it?
    thank you,
    Yoav.

    Hi Abraham,
    thsi could be a problem from the specisic setting of the infocube. Please check the BEx Settings from the infocube. You can find them by the following steps:
    - search for the infocube
    - doubleclick on the infocube
    - choose an specific infoobjekt
    - right mousebutton and click "specific dataprovider settings"
    - check if the right entries are set
    Hope this will help.
    André

  • REPLACE()   whit a   inverted commas

    Hi All
    How do I use the Replace() function to replace inverted commas ( “ ) character in a string .
    I tried to update:
    UPDATE tmp_pos
    SET address = REPLACE(address,'"');
    But it not updates anything .

    Use '''' in place of '''
    SQL> var a varchar2(30)
    SQL> exec :a := 'abcd "x"  ';
    PL/SQL procedure successfully completed.
    SQL>  print :a
    A
    abcd "x"
    SQL> select :a from dual;
    :A
    abcd "x"
    SQL> select replace(:a, '"',''') from dual;
    ERROR:
    ORA-01756: quoted string not properly terminated
    SQL> select replace(:a, '"' ,'''' ) from dual;
    REPLACE(:A,'"','''')
    abcd 'x'

  • How to print the output string in inverted commas

    hi all,
    my question is
    like i have a string
    "welcome to java"
    using println statement
    i need to print the above statement in inverted commas
    like the output should appear as
    "welcome to java"

    This sounds like part of some homework but what the
    heck ...
    System.out.println("\\"welcome to java\\"");I was trying to anticipate bugs in this stupid forum sofftware, this should be
    System.out.println("\"welcome to java\"");

  • Flex Alert box not showing text after single inverted comma

    Hi friends,
    I am launching a flex app (swf) from a JSP page. i am sending a value using flashvars like below.
    flashvars.message = '<c:out value="${requestScope.message}"/>';
    This message consists a single inverted comma in between...ex:- L'impression des pages
    But when i want to show this message using alert box in flex like Alert.show(message);, it just shows
    'L'.  i mean it is not showing complete message. the text after inverted comma is missing....
    it will be great if anyone can help me here...
    Thanks,
    Krish

    Hi friends,
    I am launching a flex app (swf) from a JSP page. i am sending a value using flashvars like below.
    flashvars.message = '<c:out value="${requestScope.message}"/>';
    This message consists a single inverted comma in between...ex:- L'impression des pages
    But when i want to show this message using alert box in flex like Alert.show(message);, it just shows
    'L'.  i mean it is not showing complete message. the text after inverted comma is missing....
    it will be great if anyone can help me here...
    Thanks,
    Krish

  • Inverted comma as digit grouping symbol?

    Is there a possibility to add a new digit grouping symbol in the admin currencies? For a swiss project I need to use: ' (inverted comma).

    Hi AMA,
    that´s exactly the problem.
    Isn´t there a way to manipulate the database to change these Options?

  • Inverted Comma's coming in Item description Automatically-Urgent

    Hi All,
    I am bit confused about how Inverted comma appears automatically although not required.What is the solution for that.My client doesn't requires that.Try to rep ASAP.
    Thanks in advance
    mona

    I would like to know whether Inverted comma's appearing for all item names that you import (or) for few.
    1. If your answer is "for few" then "check for your master data in excel sheet"
    2. Whether your master data - item description contains any single quote/ double quote/ special characters.
    3. Save your excel master data file in "CSV" format
    4. Open the "CSV" format file in notepad and use find and replace to remove those unswanted special characters (including inverted comma's).
    5. Import/ Update based on your database status.
    Note: As risk is involved in doing these steps directly in Live database, I recommend you do in test system at first.
    Hope this helps.
    Regards
    Satish

  • Apostrophe and inverted commas shortcuts fail in iOS6

    Apostrophe and inverted commas shortcuts do not work in iOS6.  Any solutions?

    They work for me. You just push and hold, then slide up to select them. Personally, I liked it better the other way, where I didn't have to look at the key.

  • Inserting the Comma Separated Strings into Table

    Hi Seniors,
    i had two string and i want to insert the records in the Table COMMENT . In this way.
    would u please give some programe to insert the records.
    The Data and the Table
    ( 901,902,903,904 )
    ( 'hai','nice','good & mail is [email protected] ','excellent and the phone 011-235323' )
    comm_id loc_id company_name comments
    1      10 901      Hai
    2      10 902      nice
    3 10      903      good & mail is [email protected]
    4      10 904      excellent and the phone 011-235323
    Thanks
    Seenu

    Hi, Seenu,
    In Oracle 10 (and up) you can easily split a comma-delimited list using REGEXP_SUBSTR.
    INSTR and SUBSTR can do the same thing in any version, but it's more complicated.
    See the general instructions below:
    /*     How to Split a Delimited String
    This shows how to take a single row with a delimited string, such as
         Animal     amoeba,bat,cedusa,dodo
    and transform it into multiple rows:
         Animal     1     amoeba
         Animal     2     bat
         Animal     3     cedusa
         Animal     4     dodo
    PROMPT     ==========  -1. sep_char parameter  ==========
    VARIABLE     sep_char     VARCHAR2 (10)
    EXECUTE     :sep_char := ',';
    SELECT     :sep_char     AS sep_char
    FROM     dual;
    PROMPT     ==========  0. string_test table  ==========
    DROP TABLE     string_test;
    CREATE TABLE     string_test
    (     grp_name     VARCHAR2 (10)
    ,     list_txt     VARCHAR2 (50)
    INSERT INTO string_test (grp_name, list_txt) VALUES ('Animal',     'amoeba,bat,cedusa,dodo');
    INSERT INTO string_test (grp_name, list_txt) VALUES ('Date',     '15-Oct-1582,16-Oct-2008');
    INSERT INTO string_test (grp_name, list_txt) VALUES ('Nothing',     NULL);
    INSERT INTO string_test (grp_name, list_txt) VALUES ('Place',     'New York');
    INSERT INTO string_test (grp_name, list_txt) VALUES ('Skip',     'Hop,,Jump');
    SELECT     *
    FROM     string_test
    ORDER BY     grp_name;
    PROMPT     ==========  Q1.  Oracle 11 Query  ==========
    WITH     cntr     AS          -- Requires Oracle 9
    (     -- Begin sub-query cntr, to generate n (1, 2, 3, ...)
         SELECT     LEVEL     AS n     -- Requires Oracle 9
         FROM     dual
         CONNECT BY     LEVEL     <= 1 +     (
                             SELECT     MAX ( REGEXP_COUNT (list_txt, :sep_char) )     -- Requires Oracle 11
                             FROM     string_test
    )     -- End sub-query cntr, to generate n (1, 2, 3, ...)
    SELECT     grp_name
    ,     n
    ,     REGEXP_SUBSTR     ( list_txt     -- Requires Oracle 10
                   , '[^' || :sep_char || ']'     -- Anything except sep_char ...
                        || '+'               -- ... one or more times
                   , 1
                   , n
                   )     AS item_txt
    FROM     string_test
    JOIN     cntr                                   -- Requires Oracle 9
    ON     n     <= 1 + REGEXP_COUNT (list_txt, :sep_char)     -- Requires Oracle 11
    ORDER BY     grp_name
    ,          n;
    /*     Notes:
         REGEXP_SUBSTR (s, '[^,]+', 1, n)
    returns the n-th item in a comma-delimited list s.
    If there are fewer than n items, it returns NULL.
    One or more consecutive characters other than comma make an item, so
    'Hop,,Jump' has two items, the second one being 'Jump'.
    The sub-query cntr produces a list of integers 1, 2, 3, ..., w
    where w is the worst-case (the largest number of items in any list).
    This actually counts separators, not items, (e.g., it counts both
    commas in 'Hop,,Jump', even though), so the w it produces may be
    larger than is really necessary.  No real harm is done.
    PROMPT     ==========  Q2. Possible Problems Fixed  ==========
    WITH     cntr     AS
    (     -- Begin sub-query cntr, to generate n (1, 2, 3, ...)
         SELECT     LEVEL     AS n
         FROM     dual
         CONNECT BY     LEVEL     <= 1 +     (
                             SELECT     MAX ( REGEXP_COUNT (list_txt, :sep_char) )
                             FROM     string_test
    )     -- End sub-query cntr, to generate n (1, 2, 3, ...)
    SELECT     grp_name
    ,     n
    ,     REGEXP_SUBSTR     ( list_txt
                   , '[^' || :sep_char || ']'     -- Anything except sep_char ...
                        || '+'               -- ... one or more times
                   , 1
                   , n
                   )     AS item_txt
    FROM     string_test
    JOIN     cntr          ON n     <= 1 + NVL     ( REGEXP_COUNT (list_txt, :sep_char)     -- Problem (1)
                                  , 0
    WHERE     REGEXP_SUBSTR     ( list_txt     -- Problem (2)
                   , '[^' || :sep_char || ']'     -- Anything except sep_char ...
                        || '+'               -- ... one or more times
                   , 1
                   , n
                   )     IS NOT NULL
    OR     list_txt     IS NULL          -- Problems (1) and (2) together
    ORDER BY     grp_name
    ,          n;
         (Possible) Problems and Fixes
    (1) If list_txt IS NULL, then REGEXP_COUNT (list_txt, :sep_char)
         returns NULL, the join condition fails, and the output
         contains nothing corresponding to the row from string_test.
         If you want a NULL item to appear in the results, use
         NVL to make sure the expression returns 0 instead of NULL.
    (2) If list_txt contains multiple consecutive sep_chars (or if it
         begins or ends with sep_char, then the original query
         will return NULL items.  To suppress these, add a WHERE
         clause to test that the item_txt to be displayed IS NOT NULL.
    PROMPT     ==========  Q3. Oracle 8.1 Query  ===========
    SELECT     grp_name
    ,     n
    ,     SUBSTR     ( list_txt
              , begin_pos
              , end_pos - begin_pos
              )     AS item_txt
    FROM     (     -- Begin sub-query to compute begin_pos and end_pos
         SELECT     grp_name
         ,     n
         ,     list_txt
         ,     INSTR     ( :sep_char || list_txt
                   , :sep_char
                   , 1
                   , n
                   )     AS begin_pos
         ,     INSTR     ( list_txt || :sep_char
                   , :sep_char
                   , 1
                   , n
                   )     AS end_pos
         FROM     string_test
         ,     (     -- Begin sub-query cntr, to generate n (1, 2, 3, ...)
              SELECT     ROWNUM     AS n
              FROM     all_objects
              WHERE     ROWNUM     <= 1 +     (
                             SELECT     MAX     ( LENGTH (list_txt)
                                       - LENGTH (REPLACE (list_txt, :sep_char))
                             FROM     string_test
              )     -- End sub-query cntr, to generate n (1, 2, 3, ...)
              cntr
         WHERE     n     <= 1 +     ( LENGTH (list_txt)
                        - LENGTH (REPLACE (list_txt, :sep_char))
         )     -- End sub-query to compute begin_pos and end_pos
    ORDER BY     grp_name
    ,          n;
    /*     Version-Dependent Features and Work-Arounds
    The code above, Q3, runs in Oracle 8.1.
    The following changes were made to Q1:
    (11) REGEXP_COUNT was introduced in Oracle 11.
         In earlier versions, to find the number of sep_chars in list_txt,
         see how much the LENGTH changes when sep_chars are removed.
    (10) REGEXP_SUBSTR was introduced in Oracle 10.
         In earlier versions, use INSTR to find where the sep_chars are,
         and use SUBSTR to get the sub-strings between them.
         (Using this technique, 'Hop,,Jump' still contains three items,
         but now item 2 IS NULL and item 3 is 'Jump'.)
    (9.a) The WITH-clause was introduced in Oracle 9
         In earlier versions, use in-line views.
    (9.b) "CONNECT BY LEVEL < constant" doesn't work in Oracle 8.
         Use ROWNUM from any sufficiently large table or view instead.
    (9.c) ANSII join notation (JOIN table_name ON ...) was introduced in Oracle 9
         In earlier versions, join condition go in a WHERE-clause.
    */

  • Insert without commit (implicit and explicit) stores data.

    Hi all:
    I have this piece of code:
    REPORT  ztest.
    DATA: wa_zsic_abonos_chk TYPE zsic_abonos_chk. "Is a transparent table
    START-OF-SELECTION.
       wa_zsic_abonos_chk-bukrs = 'MU01'.
       wa_zsic_abonos_chk-belnr = '99999'.
       wa_zsic_abonos_chk-gjahr = '2008'.
      INSERT into zsic_abonos_chk values wa_zsic_abonos_chk.
      IF sy-subrc <> 0.
        WRITE:/ 'register NOT inserted'.
      ELSE
        WRITE:/ 'register inserted'.
      ENDIF.
      SELECT SINGLE *
        INTO   wa_zsic_abonos_chk
      FROM zsic_abonos_chk
      WHERE bukrs = 'MU01'
        AND belnr = '99999'
        AND gjahr = '2008'.
      IF sy-subrc = 0.
        WRITE:/ 'register found!.'.
      ELSE.
        WRITE:/ 'register NOT found.'.
      ENDIF.
    When I run this code I get this results:
    register inserted
    register found!
    This is surprising to me, because I did not write the COMMIT WORK after the Insert.
    What I expected to have was:
    register inserted
    register NOT found
    zsic_abonos_chk is a transparent table without buffering, and the register does not exists before the Insert.
    The Database system is running below SAP is DB2.
    Can someone explain this behavior?
    Thanks in advance
    Jordi

    Today I spent some time to close this thread.
    I made this test:
    REPORT  ZTEST.
    DATA: wa_zsic_abonos_chk TYPE zsic_abonos_chk. "Is a transparent table
    START-OF-SELECTION.
       wa_zsic_abonos_chk-bukrs = 'MU01'.
       wa_zsic_abonos_chk-belnr = '999949'.
       wa_zsic_abonos_chk-gjahr = '2008'.
      INSERT into zsic_abonos_chk values wa_zsic_abonos_chk.
      IF sy-subrc <> 0.
        WRITE:/ 'register NOT inserted'.
      ELSE.
        WRITE:/ 'register inserted'.
      ENDIF.
      SELECT SINGLE *
        INTO   wa_zsic_abonos_chk
      FROM zsic_abonos_chk
      WHERE bukrs = wa_zsic_abonos_chk-bukrs
        AND belnr = wa_zsic_abonos_chk-belnr
        AND gjahr = wa_zsic_abonos_chk-gjahr.
      IF sy-subrc = 0.
        WRITE:/ 'register found!.'.
      ELSE.
        WRITE:/ 'register NOT found.'.
      ENDIF.
      ROLLBACK WORK.
      SELECT SINGLE *
        INTO   wa_zsic_abonos_chk
      FROM zsic_abonos_chk
      WHERE bukrs = wa_zsic_abonos_chk-bukrs
        AND belnr = wa_zsic_abonos_chk-belnr
        AND gjahr = wa_zsic_abonos_chk-gjahr.
      IF sy-subrc = 0.
        WRITE:/ 'register found!.'.
      ELSE.
        WRITE:/ 'register NOT found.'.
      ENDIF.
    The result is:
    register inserted 
    register found!.  
    register NOT found.
    This clarifies the matter.

  • JBO-26048 error after insert delete commit

    Using JDeveloper 10.1.2 running local OC4J against Oracle 9i database
    * JBO-26048: Constraint "APPLREFLTR_PK" violated during post operation:"Insert" using SQL Statement "BEGIN INSERT INTO DCSAT_APPL_REF_LETTER(APPLICANT_ID,LETTER_ID,LETTER_INF,CREATED_BY,CREATED_DATE,UPDATED_BY,UPDATED_DATE) VALUES (:1,:2,:3,:4,:5,:6,:7) RETURNING APPLICANT_ID INTO :8; END;".
    * ORA-00001: unique constraint (APPTRACK.APPLREFLTR_PK) violated ORA-06512: at line 1
    This was working yesterday??? I was so close then spent a day trying to track down what broke. I tried changing the database primary key to deferrable, which just changed the error message to one that said I had too many primary keys.
    Basically the following code inserts a blank row into the view object. It then looks for an existing record, if found row.remove() is called on the found row. I then update the primary key in the current record from data on the form. (The primary key is set as a dbsequence, but there isn't a trigger to set it.) then commit. I was thinking that it was the chronological order bit that is listed in the latest ADF documentation. The thing is, this did work. A case of turning off the computer, removing all class files, rebuilding the tables and running the app - now broken...
    I would appreciate ideas on where to troubleshoot, or help on how to troubleshoot this one.
    Thanks,
    Ken
    I am uploading files into an ORDSYS.ORDDOC datatype following example 3 from Steve Muench's weblog. Here is the code in my DataActionForward:
    <code>
    public class UploadReferenceLettersAction extends DataForwardAction {
    protected void processUpdateModel(DataActionContext actionContext) {
    System.out.println("*** UploadReferenceLettersAction.processUpdateModel() ***");
    super.processUpdateModel(actionContext);
    if (!(handlingEvents(actionContext))) {
    /* Create a blank record in the model and set it as the current row - only the first time in. */
    BindingContext bc = actionContext.getBindingContext();
    DCDataControl dc = bc.findDataControl("ApptrackModuleDataControl");
    ApptrackModule service = (ApptrackModule)dc.getDataProvider();
    service.insertRowRefLetterView();
    protected void findForward(DataActionContext actionContext) throws Exception {
    System.out.println("*** UploadReferenceLettersAction.findForward() ***");
    /* Try to catch errors instead of the default error handler. */
    try {
    List events = actionContext.getEvents();
    if (events != null && events.size() > 0) {
    ListIterator li = events.listIterator();
    while (li.hasNext()) {
    System.out.println("UploadApplicantResumeAction.findForward()- event : " + li.next().toString());
    } catch (Exception e) {
    System.out.println(e.getMessage() );
    // e.printStackTrace(System.out);
    super.findForward(actionContext);
    public void onCommit( DataActionContext ctx ) {
    System.out.println("*** UploadReferenceLettersAction.onCommit() ***");
    /* Get LetterId from the form
    DCBindingContainer bindings = ctx.getBindingContainer();
    DCControlBinding binding;
    binding = bindings.findCtrlBinding("LetterId");
    String letterId = (binding != null) ? binding.toString() : "";
    DBSequence letterID = new DBSequence(letterId);
    /* get applicantId */
    HttpSession session = ctx.getHttpServletRequest().getSession();
    String applicantId = "" + (String)session.getAttribute("applicantid");
    DBSequence applicantID = new DBSequence(applicantId);
    /* Remove and existing record with applicantId and letterId */
    BindingContext bctx = ctx.getBindingContext();
    DCDataControl dc = bctx.findDataControl("ApptrackModuleDataControl");
    ApptrackModule service = (ApptrackModule)dc.getDataProvider();
    // service.deleteRefLetterByApplicantidLetterid(applicantId, letterId); // passing values as Strings
    service.deleteRefLetterByApplicantidLetterid(applicantId); // passing values as Strings
    /* Update the currentRow */
    System.out.println("UploadReferenceLettersAction.onCommit() - applicantId = " + applicantId);
    // System.out.println("UploadReferenceLettersAction.onCommit() - letterId = " + letterId);
    DCBindingContainer bc = ctx.getBindingContainer();
    DCIteratorBinding iter = bc.findIteratorBinding("ApplRefLetterView1Iterator");
    Row r = iter.getCurrentRow();
    r.setAttribute("ApplicantId",applicantID); // Setting value that is of type DBSequence
    // r.setAttribute("LetterId",letterID); // Setting value that is of type DBSequence
    /* Commit the transaction */
    System.out.println("UploadReferenceLettersAction.onCommit() - Saving upload starting");
    if (ctx.getEventActionBinding() != null) {
    ctx.getEventActionBinding().doIt();
    System.out.println("UploadReferenceLettersAction.onCommit() - Saving upload complete");
    ctx.setActionForward(ctx.getActionMapping().findForward("success"));
    public void onRollback(DataActionContext ctx) {
    System.out.println("*** UploadReferenceLettersAction.onRollback() ***");
    ctx.setActionForward(ctx.getActionMapping().findForward("Edit"));
    if (ctx.getEventActionBinding() != null) {
    ctx.getEventActionBinding().doIt();
    protected boolean handlingEvents(DataActionContext ctx) {
    List events = ctx.getEvents();
    return (events != null) && (events.size() > 0);
    </code>
    In my ApplicationModule, I have the following methods for adding and deleting code:
    <code>
    public void insertRowRefLetterView() {
    ViewObject vo = getApplRefLetterView1();
    Row aRow = vo.createRow();
    vo.insertRow(aRow);
    vo.setCurrentRow(aRow);
    public void deleteRefLetterByApplicantidLetterid(String applicantId) {
    Key k = new Key(new Object[] { new DBSequence(applicantId) });
    System.out.println("ApptrackModuleImpl.deleteRefLetterByApplicantidLetterid(applicantId) - key = " + k.toStringFormat(false));
    ViewObject vo = getApplRefLetterView1();
    Row[] r = vo.findByKey(k, 1);
    if (r.length < 1) {
    System.out.println("ApptrackModuleImpl.deleteRefLetterByApplicantidLetterid(applicantId) - No key to delete");
    } else {
    System.out.println("ApptrackModuleImpl.deleteRefLetterByApplicantidLetterid(applicantId) - Found key to delete");
    Row rowFound = r[0];
    String appId = rowFound.getAttribute("ApplicantId").toString();
    System.out.println("ApptrackModuleImpl.deleteRefLetterByApplicantidLetterid(applicantId) - appId = " + appId);
    rowFound.remove();
    return;
    </code>

    I ran again with the -Djbo.debugoutput=console
    There was one line that didn't seem right:
    EntityCache:add WARNING - new row key matches a removed row
    Shortly after this, I get the primary key violation.
    *** UploadReferenceLettersAction.onCommit() ***
    ApptrackModuleImpl.deleteRefLetterByApplicantidLetterid(applicantId) - key = 00010000000132
    ApptrackModuleImpl.deleteRefLetterByApplicantidLetterid(applicantId) - Found key to delete
    ApptrackModuleImpl.deleteRefLetterByApplicantidLetterid(applicantId) - appId = 2
    [472] OracleSQLBuilder Executing Select on: DCSAT_APPL_REF_LETTER (true)
    [473] Built select: 'SELECT APPLICANT_ID, LETTER_ID, LETTER_INF, CREATED_BY, CREATED_DATE, UPDATED_BY, UPDATED_DATE FROM DCSAT_APPL_REF_LETTER ApplRefLetter'
    [474] Executing LOCK...SELECT APPLICANT_ID, LETTER_ID, LETTER_INF, CREATED_BY, CREATED_DATE, UPDATED_BY, UPDATED_DATE FROM DCSAT_APPL_REF_LETTER ApplRefLetter WHERE APPLICANT_ID=:1 FOR UPDATE NOWAIT
    [475] QueryCollection: afterRemove(1)
    [476] ViewRowCache: removeReference, vr id = 6
    [477] Delete [DeleteEvent: ApplRefLetterView1 rowIndex=1 countB4=2 count=1 rmvFromTab=true]
    UploadReferenceLettersAction.onCommit() - applicantId = 2
    UploadReferenceLettersAction.onCommit() - Saving upload starting
    [478] EntityCache:add WARNING - new row key matches a removed row
    [479] [UpdateEvent: ApplRefLetterView1 rowIndex=0 attrIndices=0]
    [480] OracleSQLBuilder: SAVEPOINT 'BO_SP'
    [481] [UpdateEvent: ApplRefLetterView1 rowIndex=0 attrIndices=5]
    [482] [UpdateEvent: ApplRefLetterView1 rowIndex=0 attrIndices=6]
    [483] OracleSQLBuilder Executing, Lock 1 DML on: DCSAT_APPL_REF_LETTER (Insert)
    [484] INSERT buf ApplRefLetter>#i SQLStmtBufLen: 480, actual=178
    [485] BEGIN INSERT INTO DCSAT_APPL_REF_LETTER(APPLICANT_ID,LETTER_ID,LETTER_INF,CREATED_BY,CREATED_DATE,UPDATED_BY,UPDATED_DATE) VALUES (:1,:2,:3,:4,:5,:6,:7) RETURNING APPLICANT_ID INTO :8; END;
    [486] OracleSQLBuilderImpl.doEntityDML failed...
    [487] X/Open SQL State is: 23000
    [488] java.sql.SQLException: ORA-00001: unique constraint (APPTRACK.APPLREFLTR_PK) violated
    ORA-06512: at line 1
    Thanks! Ken

  • JClient: after INSERT and COMMIT does not show the primary textfield value

    1. In my JClient master-detail form: When I insert a new record, enter data, and commit the changes... the master-panel's primarykey textfield is BLANK, when it should show the new auto-incremented number from the MySQL database. I have to close and open the form again to refresh that field again.
    2. In order to properly save new records in the detail-panel, I have to insert and save the above master-panel first. Is this the way JCLient handle master-detail forms?
    Thanks.

    Hi. Thanks for sharing your advice.
    Re my problem,
    if we have to refresh data by requery,i suggest you should use the way below:
    private JUNavigationBar navBar = new JUNavigationBar(true,false,true,false,true);
    navBar.setModel(JUNavigationBar.createPanelBinding(panelBinding, navBar));
    // after insert ,call this method
    navBar.doAction(navBar.BUTTON_EXECUTE);Tried this out but my textfield still won't get refreshed. Here is the code I came up with:
        private JUNavigationBar navBar = new JUNavigationBar() {
                public void doAction(int button) {
                    if (button == JUNavigationBar.BUTTON_INSERT) {
                        super.doAction(button);
                        navBar.doAction(navBar.BUTTON_EXECUTE);
                        return;
                    super.doAction(button);
            };Re your problem,
    I am developing application with JDev + MySQL,encounted another problem,
    how can i get the primary key supported by auto_increment column after insert?
    i constructed a vo whose sql statement is
    select last_insert_id() as last_id to get the value of auto_increment column.
    i found it can't get the right value unless commit the transaction.
    Would u please tell me your way?Based on what I experienced, we dont have to do the SELECT statement above. MySQL does auto-increment the primarykey but the JClient form just cant show it immediately, unless we close and re-open the form.
    What did I do to refresh the primarykey during insert? Please note that I got this solution accidentally coz I'm still a newbie in Java.
    A user want to add a record:
    1. He presses the Insert button.
    2. He enters data into a component (ex. textfield)
    3. The component's action-performed event is fired, and the following code is run:
            DCJboDataControl dc = (DCJboDataControl)panelBinding.getDataControl();
            ApplicationModule am = dc.getApplicationModule();
            Transaction tr = am.getTransaction();
            dc.commitTransaction();
            ViewObject vo = am.findViewObject("TblaccountsView1");
            vo.executeQuery();
            vo.last();It simply commits the transaction, goes to last (new) transaction, and lets the user continue his data encoding.
    Hope it helps and I hope theres an even better way to do this.

Maybe you are looking for