Problem in Saving records in JTable

Hi all,
iam using DefaultTableModel ... iam displaying Rows and Columns in my table from database..and iam adding a new row to edit data and by clicking the save button the edited data as to be stored in the database..
My task is to Add the edited data in from the JTable to the database..
My Save Method.............
The problem iam facing in these methiod is that
When ian typing data in the newly added row three columns it is showing nullpointer exception and if i type
some data in the fourth column it is printing without exception but see below i am getting table value only for three columns .............
public void save(){
     int row =info_table.getSelectedRow();
     System.out.println(row);
     strCustId = info_table.getValueAt(row, 0).toString();
     System.out.println(strCustId);
     strDelFlg =info_table.getValueAt(row, 1).toString();
     System.out.println(strDelFlg);
                     strPostCd =info_table.getValueAt(row, 2).toString();
                      System.out.println(strPostCd);
          

this question has come up VERY often in this forum, as well as the database forum, AND the java programming forum, just doing a quick search i've come up with these threads:
http://forum.java.sun.com/thread.jsp?forum=57&thread=557433
http://onesearch.sun.com/search/onesearch/index.jsp?qt=jtable+to+database&rf=0&qp=siteforumid%3Ajava48&site=dev&nh=10&cs=0&chooseCat=allJava&st=1&col=developer-forums

Similar Messages

  • Problem with saving record - second post.

    Hi I have another post in this forum for the same problem.
    I have form with over 100 items which works fine but while I was testing some new features I got an error (I have tried to execute PLSQL with error) I got an error
    wwv_flow.accept: SIGNATURE (parameter names) MISMATCH
    VARIABLES IN FORM NOT IN PROCEDURE: P_T101
    NON-DEFAULT VARIABLES IN PROCEDURE NOT IN FORM:
    DAD name: apex
    PROCEDURE : wwv_flow.accept
    URL : http://XDB HTTP Server:8081/apex/wwv_flow.accept
    PARAMETERS :
    ===========
    P_FLOW_ID:
    101
    P_FLOW_STEP_ID:
    9
    P_INSTANCE:
    4797160937577913
    P_PAGE_SUBMISSION_ID:
    3712119240091649
    P_REQUEST:
    SAVE
    P_ARG_NAMES:
    6894643590876812
    6894450662876812
    6913761084643064
    2346719179217056
    6895051399876812
    6894054107876811
    1095816090216725
    2378326059004269
    2378513031010052
    and more...
    Now when I try to save or submit this record I always get the same error, the rest of the application works fine.
    Is there any way so I can re-save this record and continue process it?
    Thanks in advance.
    Robert

    Here is what could be happening. If some of the page items are conditional or conditionally display do not save state then they do not get counted in the 100 limit. As and when the conditions allow more than 100 items to be enterable or save state it might be causing these errors.
    I did not understand the "resave these records" bit.
    Regards,

  • Error while saving record in SharePoint 2013 through jQuery

    Dear Support,
    I had successfully created provider hosted app and deployed on SharePoint 2013 online site, in my project I created
    orderservice.asmx.cs web service and write a code for save record on SharePoint 2013 online list as I mentioned below and calling on App1.js file.
    But I am facing error when I am saving record on SharePoint 2013 list on button click event
    “500 Internal Server Error
    <! DOCTYPE html>”
    <html>
    OrderService.asmx.cs
    Public
    int InsertOrder (Order
    orderRecord)
    pwd.MakeReadOnly();
    clientContext.Credentials = new
    SharePointOnlineCredentials (myUserName, pwd);
    try
    Web oWeb = clientContext.Web;
    ListCollection lists = oWeb.Lists;
    List oOrderlist = lists.GetByTitle("Order");
    clientContext.Load<ListCollection>(lists);
    clientContext.Load<List>(oOrderlist);
    ListItemCreationInformation listItemCreationInfo
    = new
    ListItemCreationInformation();
    var listItem = oOrderlist.AddItem(listItemCreationInfo);
         listItem["Title"]
    = orderRecord.OrderProfile;
    listItem["Special_x0020_Instruction"]
    = orderRecord.Instruction;
    listItem ["Customer"] = orderRecord.CustomerId;
    listItem.Update();
           clientContext.ExecuteQuery();
    return 1;
    catch
    return -1;
    App1.JS
    $("#Save").click(function
    debugger;
    var OrderProfile = $('#orderprofile').val();
    var CustomerId = $('#exCustomerlist').jqxComboBox('getSelectedItem');
    var Instruction = $('#instruction').val();
    $.ajax ({
    url: location.pathname + "OrderService.asmx/InsertOrder",
    type: "POST",
    dataType: "json",
    data: "{OrderProfile:'" + OrderProfile
    + "', CustomerId:'" + CustomerId.value
    + "', Instruction:'" + Instruction
    + "}",
    contentType: "application/json; charset=utf-8",
    beforeSend: function (XMLHttpRequest) {
    //Specifying this header ensures that the results will be returned as JSON.
    XMLHttpRequest.setRequestHeader("Accept",
    "application/json");
    success: function (response) {
    $(".errMsg ul").remove();
    var myObject = eval('('
    + response.d + ')');
    if (myObject > 0) {
                                         alert(myObject);
    $(".errMsg").append("<ul><li>Data
    saved successfully</li></ul>");
    else {
    $(".errMsg").append("<ul><li>Opppps
    something went wrong.</li></ul>");
    $(".errMsg").show("slow");
    clear();
    error: function (response) {
    alert(response.status + ' ' + response.statusText
    + ' ' + response.responseText);
    would request for your support.
    Regards,
    Akhilesh

    Hi,
    Can you call your web service using jQuery not in an app successfully?
    As the error message suggests, it might be an error on the server side.
    I suggest you do a simple test to check whether you can call the web service using jQuery.
    Here are two links would provide more information about troubleshooting this error for your reference:
    http://sadomovalex.blogspot.com/2013/08/return-json-from-asmx-when-call-it.html
    http://www.codeproject.com/Tips/761116/Troubleshooting-an-Issue-With-Calling-an-asmx-Web
    Feel free to reply with the test result if the issue still exists.
    Best regards
    Patrick Liang
    TechNet Community Support

  • Error while saving record "User:johndoe":     Error -14071

    I have added my augmented users from the AD server. When I select user and to apply a setting under Preferences I get this on attempting an "Apply", Error while saving record "User:johndoe":Error -14071. I'm authenticating to my LDAP not AD/All Domains.
    I have the server bound correctly to the AD server. Bound to AD, then promoted to OD master.
    Tried WGM from another Mac, same error.
    I recall my AD admin extending the ad schema last year for OS X 10.4.
    Thoughts? Thanks.

    Thanks David and Mabel, and all for the suggestions. I did go through "Leveraging Active..." prior to posting. I did try your method of canceling the authorization to WGM and viewing Directories. I would select a user from this method and try to apply something from MCX, but still got the -14070 error. Yes, I do have my client bound 1st OD, 2nd AD, with OD first on the search policy for the client.
    I though I had solved my issue by authenticating to WGM and LDAP. Then selecting Groups and the Members tab, I define an OD group and select that group. I can then click the "+" towards the right of the window. Then select my AD there which populates. I can add my AD groups or single users to my OD group. Then I'm able to apply MCX settings. But, no "blue" circle next to the group's silhouette. How is my method possibly incorrect?
    Also, at some point I unbound my client from AD and it seems the client is ok with getting AD info off my OD server. Example, my AD sharepoint mounts for PHD.
    But, I do have a pause of 20 secs. are more when logging into the client as well as accessing applications. Side effect of my method?

  • Problem with saving a pdf file to computer. Continually get an error message " This document could not be saved. There was a problem reading this document (21).

    Need advice on a saving file issue. I'm having problem with saving a .pdf file to computer. Continually get an error message " This document could not be saved. There was a problem reading this document (21). This is new as this error message just recently started to pop-up.

    More information about this issue can be found here:
    https://forums.adobe.com/thread/1672655
    A "quick" fix that worked for me was to uninstall Adobe... then download the base install for Adobe Reader 11.0.
    Then download each of the individual updates and run them sequentially. 
    I've installed back up to the last security update which is version 08 and have been able to do normal Save As operations.
    You will have to disable automatic updates in order to stay at version 08 until Adobe resolves this issue in a later release.
    http://www.adobe.com/support/downloads/product.jsp?product=10&platform=Windows
    Adobe Reader 11.0 - Multilingual (MUI) installer    AdbeRdr11000_mui_Std
    Adobe Reader 11.0.01 update - Multilingual (MUI) installer    AdbeRdrUpd11001_MUI.msp
    Adobe Reader 11.0.02 update - All languages    AdbeRdrSecUpd11002.msp
    Adobe Reader 11.0.03 update - Multilingual (MUI) installer    AdbeRdrUpd11003_MUI.msp
    Adobe Reader 11.0.04 update - Multilingual (MUI) installer    AdbeRdrUpd11004_MUI.msp
    Adobe Reader 11.0.05 security update - All languages    AdbeRdrSecUpd11005.msp
    Adobe Reader 11.0.06 update - Multilingual (MUI) installer    AdbeRdrUpd11006_MUI.msp
    Adobe Reader 11.0.07 update - Multilingual (MUI) installer    AdbeRdrUpd11007_MUI.msp
    Adobe Reader 11.0.08 security update - All languages    AdbeRdrSecUpd11008.msp

  • Problem while saving date field in custom table

    Hi,
    Iam facing the following problem while saving a date field in custome table
    i have a date field zdate in which the value is 02082010.
    now when i try to insert this value in the custom table it is getting updated as 20/10/0208 , but it should be 08/02/2010
    How can i correct it..
    Regards
    Kumar

    just before saving u might have to use a string reverse FM and then save it..
    CALL FUNCTION 'STRING_REVERSE'
      EXPORTING
        STRING          = p_string
        LANG            = sy-langu
    IMPORTING
       RSTRING          = r_string
    EXCEPTIONS
       TOO_SMALL        = 1
       OTHERS           = 2

  • Error while saving record "john doe":     Error: -14140

    when changing a users preferences i try and save but it comes up with this error
    Error while saving record "john doe": Error: -14140
    and wont allow me to save
    any ideas?
    Many Thanks

    This thread might help you:
    http://www.afp548.com/forum/viewtopic.php?showtopic=16200
    This document is supposed to be very good as well:
    http://www.afp548.com/filemgmt_data/files/AD-OD-2.1.pdf

  • Windows phone 8.1 not saving recorded video

    This is now a huge problem i have recorded a video of around 10 minutes when i stopped and pressed back all my app tiles goes blank so i switched off and then switched on the device guess what i got the video but it was half. Half if the video got freezed and just sound was coming and in between my video was lagging now what the **bleep** was that all about this time it was too much all my friends was insulting me was telling me to get an android windows sucks and all that stuff Microsoft dont just sit do someting no file manager guess what company which is making OS from 90s which can make a great words best selling operating system xp cant even make a great stable non lagging os for a mobile phone microsoft dont just sit work hard i am not getting any progress this is all i can doo now its up to you....

    You can submit your report in here http://social.msdn.microsoft.com/Forums/en-US/home?category=wpprevdev

  • Problem in BDC Recording

    Hi I am having a problem in BDC Recording. My requirement is that when I input data in transaction fb02 to block the invoices, It shows a list of invoices. Now i need to double click that item(line) in which PK = 06 at runtime during bdc recording. During BDC recording it takes the line number on which we have clicked which is constant but i want it dynamic that if item 1 is having PK=6, that line should be double clicked and if item 3 is having PK=6, the third item should be double clicked to open another screen. Kindly help me... Thanks in advance.

    Hi Ravi,
    While writing your code that is in your code you know which line number is having the PK = 06, then you can use the same line number and add the code for double click after that.
    Regards,
    Atish

  • Problem when saving form in web dynpro abap application in se80

    Hi,
    I am trying to develop an adobe application. When I save the form which i have designed.
    I get the "error" unable to convert data and the transaction is terminated.
    I dont have any idea why.
    Help
    Thanks,
    Harish

    Hi
    Are you getting the problem  while saving the Adobe form  or while saving the webdynpro application.
    Could you please elaborate your problem.
    Regards
    Naresh

  • Problems with saving edited photos using Photoshop Elements 5.0 on WIndows 8.

    Since a week I can not save the edited photos - when I try the communicate: "Caould not complete your request because of a program error" appeares. I had no problem with saving edited photos before, with the same software. My computer runs on Windows 8, 64 bit version. My Photoshop Elements is version 5.0. Where is the problem?

    W dniu 2013-06-16 15:36, dj_paige pisze:
    >
    Yes, I did it long ago.

  • TS1559 I bought my iphone 4s in usa apple store but when i write my serial number to support center i see warning like that. What is the problem ? Our records indicate that this product has been replaced. Please provide the serial number for your replacem

    I bought my iphone 4s in usa apple store
    ihave trouble with my iphone wifi that is gray and cannot connect any wifi network.
    i want to support for this issue.
    but when i write my serial number to support center i see warning like that. What is the problem ?
    Our records indicate that this product has been replaced. Please provide the serial number for your replacement product to find the support and warranty coverage information. For more information, please contact us.

    Nobody here would know.  Contact Apple and ask them

  • Performance problem with selecting records from BSEG and KONV

    Hi,
    I am having performance problem while  selecting records from BSEG and KONV table. As these two tables have large amount of data , they are taking lot of time . Can anyone help me in improving the performance . Thanks in advance .
    Regards,
    Prashant

    Hi,
    Some steps to improve performance
    SOME STEPS USED TO IMPROVE UR PERFORMANCE:
    1. Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
    2. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
    3. Design your Query to Use as much index fields as possible from left to right in your WHERE statement
    4. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
    5. Avoid using nested SELECT statement SELECT within LOOPs.
    6. Avoid using INTO CORRESPONDING FIELDS OF TABLE. Instead use INTO TABLE.
    7. Avoid using SELECT * and Select only the required fields from the table.
    8. Avoid nested loops when working with large internal tables.
    9. Use assign instead of into in LOOPs for table types with large work areas
    10. When in doubt call transaction SE30 and use the examples and check your code
    11. Whenever using READ TABLE use BINARY SEARCH addition to speed up the search. Be sure to sort the internal table before binary search. This is a general thumb rule but typically if you are sure that the data in internal table is less than 200 entries you need not do SORT and use BINARY SEARCH since this is an overhead in performance.
    12. Use "CHECK" instead of IF/ENDIF whenever possible.
    13. Use "CASE" instead of IF/ENDIF whenever possible.
    14. Use "MOVE" with individual variable/field moves instead of "MOVE-
    CORRESPONDING" creates more coding but is more effcient.

  • Problem in displaying records in multi record block

    Hi all,
    I have a problem in displaying records in a multi record block in a form.
    I have 1 control block and 1 data block(multi-record block).
    Control block has one item CUSTOMER-ID. Data block has many other items related to customer.
    when a value is entered in customer-id text item, all the relavant details should be displayed in the data block.
    but, the records are overlapping in the same line in the data block, actually they have to be displayed one record per one line.
    The code is,
    IF :CUST_BLOCK.CUST_ID IS NOT NULL THEN
    GO_BLOCK('XBSI_CONTRACT_PRICE_FACTORS');
    FOR C1 IN C
    LOOP
    :XBSI_CONTRACT_PRICE_FACTORS.CUST_ID:=c1.site_use_id;
    :XBSI_CONTRACT_PRICE_FACTORS.CAT_ID:=c1.ipc_category_id;
    :XBSI_CONTRACT_PRICE_FACTORS.MFG_ID:=c1.mfg_category_id;
    :XBSI_CONTRACT_PRICE_FACTORS.INVENTORY_ITEM_ID:=c1.inventory_item_id;
    :XBSI_CONTRACT_PRICE_FACTORS.PRICE_BASIS:=c1.price_basis;
    :XBSI_CONTRACT_PRICE_FACTORS.PRICE_FACTOR:=c1.price_factor;
    END LOOP;
    Please help me out..
    Thanks in advance!
    Suman

    Hi Suman
    IF :CUST_BLOCK.CUST_ID IS NOT NULL THEN
    GO_BLOCK('XBSI_CONTRACT_PRICE_FACTORS');
    first_record;
    FOR C1 IN C
    LOOP
    :XBSI_CONTRACT_PRICE_FACTORS.CUST_ID:=c1.site_use_id;
    :XBSI_CONTRACT_PRICE_FACTORS.CAT_ID:=c1.ipc_category_id;
    :XBSI_CONTRACT_PRICE_FACTORS.MFG_ID:=c1.mfg_category_id;
    :XBSI_CONTRACT_PRICE_FACTORS.INVENTORY_ITEM_ID:=c1.inventory_item_id;
    :XBSI_CONTRACT_PRICE_FACTORS.PRICE_BASIS:=c1.price_basis;
    :XBSI_CONTRACT_PRICE_FACTORS.PRICE_FACTOR:=c1.price_factor;
    next_record;
    END LOOP;
    Try this. you are trying to show all the records in same line. so its overlapping.
    Thankyou
    [email protected]

  • Problem in saving values to DB

    Hi,
    i'm a new bie to BSP. Currently i'm facing some problems in saving the values to DB
    I'm assigning value for a html hidden field in VBScript, how do i save the same in the SAP database.
    Thnx in Advance
    Vinodh

    Hello, welcome!
    Second please check out this weblog:
    <a href="/people/brian.mckellar/blog/2004/06/11/bsp-trouble-shooting-getting-help">BSP Trouble Shooting: Getting Help</a>
    Third, check out in transaction SE80 the BSP Application SBSPEXT_HTMLB and look at the one for inputField.
    Then I would highly recommend checking out this weblog series: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/exploring%20bsp%20development%20and%20the%20miniwas.htm
    It's a complete tutorial including saving to the DB.

Maybe you are looking for

  • Firefox will not open multiple windows.

    Just upgraded to Firefox 3.6.3. I can open multiple tabs in the open window, but I can not open another window. Possibly unrelated issue is the search bar not functioning. As for the window issue, I've tried; Ctrl + N File [N] File -> New Window Rt C

  • Cookies are not being cleared when I close the browser although the option is set. Any suggestions?

    Under Options; Privacy I have Clear history when Firefox closes ticked and within the Settings for Clearing History I have Cookies ticked. Cookies are not being cleared when I close the browser. Windows 7, SP1 x64

  • Faces not working with Facbook

    If I name the people in my photos and then upload to FB, although tags are created, they are not correct and my friends don't get any notifications. If I try to re-tag them in FB it then appears that there are multiple entries in the drop down box an

  • Anyway you can change color on iPod?

    I have a question regarding to iPod 60GB Video, it works fine and everything but I was wondering if you could change the color settings or the font, like the part of the artist and song title come up. Anyway if anyone could answer this for me I'd app

  • Custom InfoAreas and InfoObject Catalog

    Hi, How to assign business content cubes and info objects to custom info areas and info object catalog while activating itself? Thank you, sam