Refresh jTable after inserting new data into the Database

Hey all,
I'm using Netbeans 6.5 to create a Desktop Application which is connected to a Java DB (Derby).
The first simple steps were all very successfull:
Create the jTable and bind it to the Database => everything works fine. When the application starts it correctly shows all data from the database.
The problem starts when I try to insert new data to the database.
For that reason I've created textfields and a button "Save". When I press the button it successfully inserts the data to the database but they are not displayed in the jTable (when the application starts they are all there, they are not updated at runtime) . I've tried table.invalidate() and table.repaint() but they just don't work.
Any help will be GREATLY appreciated. But please have in mind that most of the code is Netbeans-generated and most of it not editable.
Many thanks in advance.
George

Once again you are right my friend. I jumped to conclusion way too fast, when I shouldn't. (Give me a break, I've been busting my head with this well over a week). The response I saw when I did that was that indeed a line is added to the jTable. Because I falsly set the index of the object to be added to be second to last the row appeared on the table, what I didn't see at the time was that the last one disappeared. Hmm...
A new adventure begins...
So after a few hours of messing around with it here are my observations:
1) It was not an observable list. When I add the new element with employeesList.add(newEmp); , the table gets notified but a get a bunch of exceptions:
xception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 84, Size: 84
        at java.util.ArrayList.RangeCheck(ArrayList.java:546)
        at java.util.ArrayList.get(ArrayList.java:321)
        at org.jdesktop.swingbinding.impl.ListBindingManager$ColumnDescriptionManager.validateBinding(ListBindingManager.java:191)
        at org.jdesktop.swingbinding.impl.ListBindingManager.valueAt(ListBindingManager.java:99)
        at org.jdesktop.swingbinding.JTableBinding$BindingTableModel.getValueAt(JTableBinding.java:713)
        at javax.swing.JTable.getValueAt(JTable.java:1903)
        at javax.swing.JTable.prepareRenderer(JTable.java:3911)
        at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
        at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
        at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1897)
        at javax.swing.plaf.ComponentUI.update(ComponentUI.java:154)
        at javax.swing.JComponent.paintComponent(JComponent.java:743)
        at javax.swing.JComponent.paint(JComponent.java:1006)
        at javax.swing.JViewport.blitDoubleBuffered(JViewport.java:1602)
        at javax.swing.JViewport.windowBlitPaint(JViewport.java:1568)
        at javax.swing.JViewport.setViewPosition(JViewport.java:1098)
        at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.vsbStateChanged(BasicScrollPaneUI.java:818)
        at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:807)
        at javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRangeModel.java:348)
        at javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRangeModel.java:285)
        at javax.swing.DefaultBoundedRangeModel.setValue(DefaultBoundedRangeModel.java:151)
        at javax.swing.JScrollBar.setValue(JScrollBar.java:441)
        at javax.swing.plaf.basic.BasicScrollBarUI.scrollByUnits(BasicScrollBarUI.java:907)
        at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.mouseWheelMoved(BasicScrollPaneUI.java:778)
        at javax.swing.plaf.basic.BasicScrollPaneUI$MouseWheelHandler.mouseWheelMoved(BasicScrollPaneUI.java:449)
        at apple.laf.CUIAquaScrollPane$XYMouseWheelHandler.mouseWheelMoved(CUIAquaScrollPane.java:38)
        at java.awt.Component.processMouseWheelEvent(Component.java:5690)
        at java.awt.Component.processEvent(Component.java:5374)
        at java.awt.Container.processEvent(Container.java:2010)
        at java.awt.Component.dispatchEventImpl(Component.java:4068)
        at java.awt.Container.dispatchEventImpl(Container.java:2068)
        at java.awt.Component.dispatchMouseWheelToAncestor(Component.java:4211)
        at java.awt.Component.dispatchEventImpl(Component.java:3955)
        at java.awt.Container.dispatchEventImpl(Container.java:2068)
        at java.awt.Component.dispatchEvent(Component.java:3903)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
        at java.awt.Container.dispatchEventImpl(Container.java:2054)
        at java.awt.Window.dispatchEventImpl(Window.java:1801)
        at java.awt.Component.dispatchEvent(Component.java:3903)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 84, Size: 84
        at java.util.ArrayList.RangeCheck(ArrayList.java:546)
        at java.util.ArrayList.get(ArrayList.java:321)
        at org.jdesktop.swingbinding.impl.ListBindingManager$ColumnDescriptionManager.validateBinding(ListBindingManager.java:191)
        at org.jdesktop.swingbinding.impl.ListBindingManager.valueAt(ListBindingManager.java:99)
        at org.jdesktop.swingbinding.JTableBinding$BindingTableModel.getValueAt(JTableBinding.java:713)
        at javax.swing.JTable.getValueAt(JTable.java:1903)
        at javax.swing.JTable.prepareRenderer(JTable.java:3911)
        at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
... and a lot morewhich from my poor understanding means that the jTable succesfully notices the change but it is not able (??) to adjust to the new change. What is more interesting is that when I plainly add the element to the end of the list (without an idex that is), a blank row appears at the end of my Table. The weird thing is that I've bound the table to some text fields below it, and when I select that empty row all the data appear correctly to the text fields.
I tried going through:
                org.jdesktop.observablecollections.ObservableCollections.observableList(employeesList).add(newEmp);as well as
                help = org.jdesktop.observablecollections.ObservableCollections.observableListHelper(employeesList);
                help.getObservableList().add(newEmp);
                help.fireElementChanged(employeesList.lastIndexOf(newEmp));and
                obsemployeesList = org.jdesktop.observablecollections.ObservableCollections.observableList(employeesList);
                obsemployeesList.add(newEmp);and I still get the same results (both the exeptions and the mysterious empty row at the end of the table
So, I'm again in terrible need of your advice. I can't thank you enough for the effort you put into this.
Best regards,
George
Edited by: tougeo on May 30, 2009 11:06 AM
Edited by: tougeo on May 30, 2009 11:21 AM
Edited by: tougeo on May 30, 2009 11:30 AM

Similar Messages

  • Uploading spreadsheet data into the database

    Hi
    I want to upload the spreadsheet data into the database through front end...I dont have any idea how to do upload without using the 'utilities' option..Can anyone please help me to do this?
    Thanks in advance
    Fazila

    Hi
    I refered the example sent by vikas...but i could not understand..I dont need to specify table name in runtime...my requirement is that I will have the constant table(say MD look up table)...and I will have some data under the column heading( say repid,split name)...
    Now I want to import my spreadsheet data which are under the heading repid and split name through my front end application and I have the option whether to 'overwrite' the records or 'append' the new records...after clicking the necessary option..I want to import my spread sheet data into the table defined already...and my another requirement is that I want to check the duplication of data between the spreadsheet and table...If I find the duplicates, I have to omit it and store the remaing details....
    Please give me some guidelines to solve this problem....
    Thanks in advance
    Fazila

  • I can't insert my data into the table - help please

    Hello everyone,
    I have a trouble about JSP. I'm using Java2 SDK,JSP 1.2,Mysql and TOMCAT.
    I want to do this. A user has to enter the nicno,into the html form(EnterNicInter.jsp),to verify if it is already exist or not. If it is exist in the db, an error msg(Record already exist) must be displayed. If not, then the page "InterviewForm.jsp" displayed. This part is working.
    But, I can't save these details into the db by clicking submit button int the InterviewForm.jsp.
    I wrote a javaBean for this task. Here is it.
    CandidateMgr.java
    package hrm;
    import java.io.*;
    import java.sql.*;
    public class CandidateMgr
         private String nicno;
            private String title;
            private String firstName;
         private String civilStatus;
            private String tele;
            private String eduQua;
         // Constructor
         public CandidateMgr()
              this.nicno = nicno;
              this.title = title;
              this.firstName = firstName;
              this.civilStatus= civilStatus;
              this.tele = tele;
              this.eduQua = eduQua;
              //getters & setters.
               // Initializes the connection and statements
            public void initConnection() {
                    if (connection == null) {
                 try {
                          String sql;
                          // Open the database
                          Class.forName(DRIVER).newInstance();
                          connection = DriverManager.getConnection(URL);
                          //Verify nicno
                          sql="SELECT * FROM Candidate where nicNo= ?";          
                   pstmt1 = connection.prepareStatement(sql);
                   sql ="INSERT INTO Candidate                               
                   VALUES(?,?,?,?,?,?)";
                   pstmt2 = connection.prepareStatement(sql);
             catch (Exception ex) {
                System.err.println(ex.getMessage());
         public boolean verifyNicNo(){
              boolean nic_no_select_ok = false;
              String nic="xxxx";
              initConnection();
                    try {
                       pstmt1.setString(1, nicno);
                   ResultSet rs1 = pstmt1.executeQuery();               
                                if(rs1.next()){
                        nic=rs1.getString("nicNo");
                               if(nic=="xxxx")
                        nic_no_select_ok = true;
                   } else{
                        nic_no_select_ok = false;     
                   rs1.close();
                           pstmt1.close();
                    catch (Exception ex) {
                      System.err.println(ex.getMessage());
              return nic_no_select_ok;
         public boolean addInter(){
              boolean add_inter_ok = false;
              try{
                      //assign values for the object
                   pstmt2.setString(1, nicno);   //      ERROR(java:652)
                   pstmt2.setString(2, title);
                   pstmt2.setString(3, firstName);
                   pstmt2.setString(4, civilStatus);
                   pstmt2.setString(5, tele);     
                   pstmt2.setString(6, eduQua);
                   if(pstmt2.executeUpdate()==1) add_inter_ok=true;
                   pstmt2.close();  
                  catch(SQLException e2){
                           System.err.println(e2.getMessage());
              return add_inter_ok;
    IntreviewForm.jsp (used to submit data into the db)
    <form method="POST" action="InterviewCtrl.jsp">
         //codes
    <input type="text" name="nicno" size="14" style="border:1px solid #0000FF;           
    color: #FF0000; font-weight: bold">
    <input type="text" name="title" size="14" style="border:1px solid #0000FF;           
    color: #FF0000; font-weight: bold">
    <input type="text" name="firstName" size="14" style="border:1px solid #0000FF;           
    color: #FF0000; font-weight: bold">
    <input type="text" name="civilStatus" size="14" style="border:1px solid #0000FF;           
    color: #FF0000; font-weight: bold">
    <input type="text" name="tele" size="14" style="border:1px solid #0000FF;           
    color: #FF0000; font-weight: bold">
    <input type="text" name="eduQua" size="14" style="border:1px solid #0000FF;           
    color: #FF0000; font-weight: bold">
    </form>.......................................................................
    Here is the "InterviewCtrl.jsp"
    <%@ page language="java" import="java.util.*"%>
    <%@ page import="hrm.CandidateMgr" %>
    <%@ page session="false" %>
    <jsp:useBean id="candidate" class="hrm.CandidateMgr" scope="request"/>
    <jsp:setProperty name="candidate" property="*"/>
    <%-- Execute the addInter() method on the bean and check if it is true or false.-- %>
    <%-- if it's true then display a confirmation message "InterConfirm.html" --%>
    <%-- else display InterError.html --%>
    <%
    String nextPage ="MainForm.jsp";
    if(candidate.addInter()){
         nextPage="InterConfirm.html";
         }else{
         nextPage="InterError.html";
    %>
    <jsp:forward page="<%=nextPage%>"/>.......................................................................
    Here is the error:(I mark it in my bean also)
    root cause
    java.lang.NullPointerException
         at hrm.CandidateMgr.addInter(CandidateMgr.java:652)
         at org.apache.jsp.InterviewCtrl_jsp._jspService(InterviewCtrl_jsp.java:66)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    I use JSP 1.2 , mySQL with TOMCAT. My table name is Candidate.It's fields are as follows:
    Candidate(nicNo,title,fName,civilStatus,tele,eduQua)
    Can anybody tell me whats going on, help me to solve this please.
    Thanks.

    you should try something different, since you are mixing up a lot of code.
    1) create a separate method just to connect and disconnect from a database;
    2) use the value entered and see if you can find a record in the table. If the record is there, then you should re-direct your jsp to a jspError, else goes to another form.
    the code below give you some idea
          if( sAction.equals("Add1") ) {
            sITEM = request.getParameter("parameter1");
            try {
              itemmaster.connect();
              itemmaster.viewitemmaster( sITEM );
              rs = itemmaster.getRs();
              if( rs.next() ) {
                sURL = "additemmaster1.jsp";
              else {
                request.setAttribute( "asITEM", sITEM );
                sURL = "additemmaster2.jsp";
            finally {
              rs.close();
              itemmaster.disconnect();
          }

  • How to insert new record in the database table using the Jdeveloper

    Hi Masters
    I am new Bee in j2EE developing side and i ahve oracle jdeveloper 9i version is 9.0.4
    And now I wann to know that how can i create the web application that will enter the Data in the HTML FORM and save that data into the Table emp plz tell me step by step
    thx in advance

    the steps to follow -
    download JDeveloper 10.1.2 from OTN (9.0.4 is very old and has some features that won't be in the next releases).
    Then follow the ADF Workshop from the JDeveloper home page on OTN.
    (If you have to use 9.0.4 then look for the archives of JDeveloper on OTN)
    for example:
    http://www.oracle.com/technology/products/jdev/viewlets/viewlet-archive0903.html

  • Insert french characters into the database

    Hi,
    My user requirement is to insert french characters into the db. However he has set as per my suggestion of altering session alter session set nls_language='french' he can't insert french characters. Is this using alter session helps to retrieve only the outputs in french language or to insert too?
    Please help.
    Version : oracle 8i
    nls_parameters at database level:
    SQL> select * from nls_database_parameters;
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET US7ASCII
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    PARAMETER VALUE
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZH:TZM
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZH:TZM
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_NCHAR_CHARACTERSET US7ASCII
    NLS_RDBMS_VERSION 8.1.7.0.0

    Your database character set is US7ASCII : you can only insert ASCII characters which is OK for most French characters but not all. This cannot work for:
    àéèùçChanging NLS_LANGUAGE won't help. You need to change database character set to WE8MSWIN1252 for example. This should be easy in your case because US7ASCII is a binary subset of many others characters set. Please read http://docs.oracle.com/cd/A87860_01/doc/server.817/a76966/ch3.htm#47136

  • Should be able to enter both Japanese data and English data into the database without

    Scenario 1:
    Database Char Set: UTF 8
    National CharSet :UTF8
    String Type:Varchar2
    Problem :Unable to enter more than 1/3rd of the field length specified when entering Kanji(Japanese) Data
    Scenario 2:
    Database Char Set: JA16EUC/JA16SJIS
    National CharSet :JA16EUCFixed/JA16SJISFixed
    String Type:NVarchar2
    Problem :Unable to enter/retrieve English data written into the database but works fine with Japanese
    Scenario 3:
    Database Char Set: UTF8
    National CharSet :JA16EUCFixed
    String Type:NVarchar2
    Problem :Unable to enter/retrieve English data written into the database but works fine with Japanese
    null

    You will not be able to display the process form, or edit those values from the view profile screen.
    You would need to create custom fields that are mapped from the process form to the user's profile. Then you would need to create user form update triggers from the User Defined Fields that when the user changes them, they get pushed to the target process form by adding those task names into the provisioning process definition. This would then trigger the updates to the target resource.
    -Kevin

  • I cannot find the new data in the database

    Hi
    I'm newbie at SQL.
    I read and watched a lot about the SQL. But still can't figure out the problem.
    THE PROBLEM:
    we are using accounting software for our business.
    the software keeping records of clients names and other information.
    when I open the software, i can access everything, but i can't edit the File Number for example.
    So I tried to access the files from within windows. Then I learned that the files I'm looking for are called Database.Which brought me to SQL server.
    short story: I opened the database using SQL server but it contains only data that are three years old.
    How i can find the new data. Right now the database seems to have only 97K records.

    well, what i did is open SQL server, selected the database, then scroled to the Clients Table then opened it.
    I can only see the ID and Name, other information is always NULL
    I scrolled down to the last one which has ID 97000 for example.
    Then I went back to the Application, from there i can see the other information about every client, and i can see that this client file was created like three years ago
    I started to think that the application is using a different database
    even though I searched for any MDF file or a file that was recently edited, I can't find anything else

  • Somehow ejbCreate method of an Entity EJB is not inserting a record into the database. I'm using BMP and calling the Entity bean method from a servlet. I'm using NAS 4.0 sp5 on Win 2k.

    Also if I call the insert query from within the servlet it works fine. I have disabled global transactions. Am I missing something out ? Please
    any help would be greatly appreciated.

    May be your servlet is not able to lookup the EJB. You can use some print statements and see whether lookup ok or not.
    Just a guess.
    Plese get back, if any queries.
    Thanks,
    Rakesh.

  • Is it best to set waveform graph scale properties before or after sending new data to the graph?

    Hi I'm wondering when is the best time to update waveform graph scale properties.
    I am sampling data every 15 minutes for 192 samples, i.e. 48 hours.  I want to plot these samples with the x scale in absolute time mode so that x scale maximum is the current time and x scale minimum is x max minus 48 hours (172800 seconds).  I also want the intermediate scale markers to be 6 hours apart and to be multiples of whole 6 hours.  e.g. at 06:00, 12:00, 18:00.  This works OK using property nodes but sometimes the intermediate markers are on the 6 hour multiples and sometimes they are at 6 hours after the min scale marker.  e.g. 09:15, 15:15, 21:15.  Is there a way of guaranteeing that the intermediate markers will be on the 6 hour multiples?
    Thanks,
    Neville
    Solved!
    Go to Solution.

    Hi Bryan,
    Thanks for your reply.  I have discovered that I can achieve what I want by using an XY graph instead of a waveform graph.  I want X max to be the current time and X min the be 48 hours earlier with intermediate scale markers on multiple of 6 hours.  The XY graph in the attached VI does exactly that but I can't get the waveform graph to behave as I would like.  Is there a way of getting the waveform graph to behave as I would like?
    Thanks,
    Neville
    Attachments:
    waveform graph x axis scale.vi ‏16 KB

  • Insert Current Date into text Field

    Hi I was wondering if anyone knows how to insert the current
    date into a text field using ASP.NET C# page. When the page loads.
    Or better still insert current date into my database when the
    page is updated. using the insert Server behavier.
    I would be very greatfull for any help.

    To assign it to a text box you couls use the following in the
    onload
    function
    textbox.Text = DateTime.Now.toString;
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "cantmakeitwork" <[email protected]> wrote
    in message
    news:e9qhrv$crd$[email protected]..
    > Hi I was wondering if anyone knows how to insert the
    current date into a
    > text
    > field using ASP.NET C# page. When the page loads.
    >
    > Or better still insert current date into my database
    when the page is
    > updated.
    > using the insert Server behavier.
    >
    > I would be very greatfull for any help.
    >

  • Why does not the data get saved into the Database

    Please check if there is any thing wrong with my code here. Why cant i save the data in to my database. when i used the same things in other places it works.
    guys i have copied a portion of the code here. right now i have commented few areas to not give me any errors on the whole program
    Please check why cant i save the data into the database.
    i have created a seperate class for database connection Utilities
    void saveData()
                   //Utilities ut = new Utilities();
                   //connection = ut.getConnection();
                   //ResultSet resultSet;
              // JourneyID = ut.getResults(qryJourneyID);
                   strJourneyID = txtJourneyID.getText();
                   System.out.println("++++++++++++++++++++++++"+strJourneyID);
                   strVehicleID = (String)comboVehicleID.getSelectedItem();
                   System.out.println("++++++++++++++++++++++++"+strVehicleID);
                   strDriverID = (String)comboDvrID.getSelectedItem();
                   System.out.println("++++++++++++++++++++++++"+strDriverID);
                   strStartDateTime = txtDateTime.getText();
                   System.out.println("++++++++++++++++++++++++"+strStartDateTime);
                   int a = JOptionPane.showConfirmDialog (null, "Are u sure you want to save the changes?", "WARNING!", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
                        if (a == 0)
                             if(NEW)// new is a boolean value
                                  //ADDING NEW DATA STATMENT
                                  System.out.println("INSERTING NEW ROW IN THE TABLE...");
                                  try
                                       String insert ="INSERT INTO Job VALUES (" + "'" + strJourneyID + "'"+
                                       ", '"+ strVehicleID +     "',"
                                       +"'"+ strDriverID +"',"
                                       + "'"+ strStartDateTime +"')";
                                       System.out.println("STATEMENT IS " + insert);
    //                                   InsertStmt = connection.createStatement();
    //                                   InsertStmt.executeUpdate(insert);
                                       JOptionPane.showMessageDialog(null, "You data has been successfully saved.","TIS: Operation completed", JOptionPane.INFORMATION_MESSAGE);
                                  catch (Exception e)
                                       e.printStackTrace();
                                       JOptionPane.showMessageDialog(null, "Problem encountered while adding new data");
                             else
                                  JOptionPane.showMessageDialog(null, "it is supposed to save data");
                                  /*try
                                       String ChangeRecord = "UPDATE Job SET " +
                                       "JourneyID = '" + strJourneyID+ "'"+
                                       "VehicleID = '" + strVehicleID+"',"+
                                       "DriverID = '"+strDriverID+"'," +
                                       "StartDateTime='" + strStartDateTime+ "'";//syntax error???
                                       System.out.println(""+ ChangeRecord);
                                       UpdateStmt = connection.createStatement();//just added
                                       UpdateStmt.executeUpdate(ChangeRecord);
                                       JOptionPane.showMessageDialog(null, "You data has been successfully saved.","TIS: Operation completed", JOptionPane.INFORMATION_MESSAGE);
                                  catch (Exception change_exception)
                                       change_exception.printStackTrace();
                                       JOptionPane.showMessageDialog (null, "Problem encountered while updating","TIS: Problem encountered",JOptionPane.ERROR_MESSAGE);
                        else
                             JOptionPane.showMessageDialog(null, "You chose to cancel the operation","Operation cancelled", JOptionPane.INFORMATION_MESSAGE);
                        }

    Yes you have commented all the code that update the
    database so how can it update the database.
    By the way for inserting dont use Statement use
    PrepairedStatement
    by the way next time please post codes in code tagsMan i have commented it becaues it if i dont comment it givens me errors. like cannot find variable and i dont understand how to use the code button. whereever i click the code button it displays the  at the end of the code! what to do?
    connection = ut.getConnection();
    ResultSet resultSet;
    UpdateStmt = connection.createStatement();
    UpdateStmt = connection.createStatement();
    UpdateStmt.executeUpdate(ChangeRecord);
    please check it once again
    void saveData()
                   Utilities ut = new Utilities();
                   connection = ut.getConnection();
                   ResultSet resultSet;
              // JourneyID = ut.getResults(qryJourneyID);
                   strJourneyID = txtJourneyID.getText();
                   System.out.println("++++++++++++++++++++++++"+strJourneyID);
                   strVehicleID = (String)comboVehicleID.getSelectedItem();
                   System.out.println("++++++++++++++++++++++++"+strVehicleID);
                   strDriverID = (String)comboDvrID.getSelectedItem();
                   System.out.println("++++++++++++++++++++++++"+strDriverID);
                   strStartDateTime = txtDateTime.getText();
                   System.out.println("++++++++++++++++++++++++"+strStartDateTime);
    int a = JOptionPane.showConfirmDialog (null, "Are u sure you want to save the changes?", "WARNING!", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
                        if (a == 0)
                             if(NEW)
                                  //ADDING NEW DATA STATMENT
                                  System.out.println("INSERTING NEW ROW IN THE TABLE...");
                                  try
                                       String insert ="INSERT INTO Job VALUES (" + "'" + strJourneyID + "'"+
                                       ", '"+ strVehicleID +     "',"
                                       +"'"+ strDriverID +"',"
                                       + "'"+ strStartDateTime +"')";
                                       System.out.println("STATEMENT IS " + insert);
    //                                   InsertStmt = connection.createStatement();
    //                                   InsertStmt.executeUpdate(insert);
                                       JOptionPane.showMessageDialog(null, "You data has been successfully saved.","TIS: Operation completed", JOptionPane.INFORMATION_MESSAGE);
                                  catch (Exception e)
                                       e.printStackTrace();
                                       JOptionPane.showMessageDialog(null, "Problem encountered while adding new data");
                             else
                                  JOptionPane.showMessageDialog(null, "it is supposed to save data");
                                  try
                                       String ChangeRecord = "UPDATE Job SET " +
                                       "JourneyID = '" + strJourneyID+ "'"+
                                       "VehicleID = '" + strVehicleID+"',"+
                                       "DriverID = '"+strDriverID+"'," +
                                       "StartDateTime='" + strStartDateTime+ "'";//syntax error???
                                       System.out.println(""+ ChangeRecord);
                                       UpdateStmt = connection.createStatement();//just added
                                       UpdateStmt.executeUpdate(ChangeRecord);
                                       JOptionPane.showMessageDialog(null, "You data has been successfully saved.","TIS: Operation completed", JOptionPane.INFORMATION_MESSAGE);
                                  catch (Exception change_exception)
                                       change_exception.printStackTrace();
                                       JOptionPane.showMessageDialog (null, "Problem encountered while updating","TIS: Problem encountered",JOptionPane.ERROR_MESSAGE);
                        else
                             JOptionPane.showMessageDialog(null, "You chose to cancel the operation","Operation cancelled", JOptionPane.INFORMATION_MESSAGE);
                        }

  • Saving dates in the database

    How do I save a date in the database?
    My code is as follows:
    int year = 2002;
    int month = 2;
    int day = 3;
    java.util.Date sdate = new java.util.Date(year, month, day);
    PreparedStatement ps = "INSERT INTO period_table(pe_start) VALUES (?)";
    ps.setDate(1, sdate);
    ps.executeUpdate();

    To insert a Date into a database the best way is to use
    the java.sql.Date object instead of the java.util.Date
    int year = 2002;
    int month = 2;
    int day = 3;
    java.util.Date sdate = new java.util.Date(year, month, day);
    java.sql.Date sqldate = new java.sql.Date(sdate.getTime());
    Write the sqldate variable into the database.

  • How to update data in the database through ALV grid

    Hi All,
    I diplayed an ALV grid with five fields in a classical report. I have already set the fieldcat for one field as wa_fcat_edit = 'X'. I am able to edit(modify) the data in that field. But I want to update the data into the database which is modified by me in that field. Can I update the data using BDC or any other procedure?
    This is an urgent require ment for me. Please help me ASAP.
    Thanks & Regards,
    Ramesh.

    Hi
    Please go through the link.
    Link: [http://www.****************/Tutorials/ALV/Edit/demo.htm]
    regards
    ravisankar

  • How to load a XML file into the database

    Hi,
    I've always only loaded data into the database by using SQL-Loader and the data format was Excel or ASCII
    Now I have to load a XML.
    How can I do?
    The company where I work has Oracle vers. 8i (don't laugh, please)
    Thanks in advance!

    Hi,
    Tough job especially if the XML data is complex. The have been some similar question in the forum:
    Using SQL Loader to load an XML File -- use 1 field's data for many records
    SQL Loader to upload XML file
    Hope they help.
    Regards,
    Sujoy

  • Insert data into the xml schema-based xmltype table problem!

    Hello, there,
    I got problem in inserting data into the xmltype table after registered XML schema and created table. details see below:
    1) xml schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSpy v2007 sp2 (http://www.altova.com) by Constantin Ilea (EMERGIS INC) -->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.emergis.com/eHealth/EHIP/data/meta/profile:v1" targetNamespace="http://www.emergis.com/eHealth/EHIP/data/meta/profile:v1" elementFormDefault="qualified">
         <!-- ************** PART I: BEGIN SIMPLE OBJECT TYPE DEFINITIONS ********************************** -->
         <xs:simpleType name="RoutingType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="Synch"/>
                   <xs:enumeration value="Asynch"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="StatusType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="ACTIVE"/>
                   <xs:enumeration value="VOID"/>
                   <xs:enumeration value="PENDING"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="SenderApplicationType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="PR"/>
                   <xs:enumeration value="CR"/>
                   <xs:enumeration value="POS"/>
                   <xs:enumeration value="CPP"/>
                   <xs:enumeration value="Other"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="ServiceTypeType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="IS"/>
                   <xs:enumeration value="WS"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="RouteDirect">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="Request"/>
                   <xs:enumeration value="Reply"/>
                   <xs:enumeration value="None"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="Indicator">
              <xs:annotation>
                   <xs:documentation>can we also change the value to "ON" and "OFF" instead? in this way this cn be shared by all type of switch indicator</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="YES"/>
                   <xs:enumeration value="NO"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="RuleType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="ControlAct"/>
                   <xs:enumeration value="WSPolicy"/>
                   <xs:enumeration value="AccessControl"/>
                   <xs:enumeration value="Certification"/>
                   <xs:enumeration value="MessageConformance"/>
                   <xs:enumeration value="Variant"/>
                   <xs:enumeration value="Routing"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="HL7Result">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="ACCEPT"/>
                   <xs:enumeration value="REFUSE"/>
                   <xs:enumeration value="REJECT"/>
                   <xs:enumeration value="ACK"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="IIPType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="PUT"/>
                   <xs:enumeration value="GET/LIST"/>
                   <xs:enumeration value="NOTIF"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="ProfileTypeType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="IIPProfile"/>
                   <xs:enumeration value="BizOperationProfile"/>
                   <xs:enumeration value="OrchestrationProfile"/>
                   <xs:enumeration value="DomainObjectProfile"/>
                   <xs:enumeration value="ServiceProfile"/>
                   <xs:enumeration value="ExceptionProfile"/>
                   <xs:enumeration value="CustomizedProfile"/>
                   <xs:enumeration value="SystemProfile"/>
                   <xs:enumeration value="HL7XMLSchemaProfile"/>
                   <xs:enumeration value="EnricherParametersProfile"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="ParameterType">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="String"/>
                   <xs:enumeration value="Object"/>
                   <xs:enumeration value="Number"/>
                   <xs:enumeration value="Document"/>
              </xs:restriction>
         </xs:simpleType>
         <!-- ************** PART I: END SIMPLE OBJECT TYPE DEFINITIONS ********************************** -->
         <!-- ************** PART II: BEGIN COMPLEX OBJECT TYPE DEFINITIONS ********************************** -->
         <!-- *********************** begin new added objects, by rshan *************************************** -->
         <xs:complexType name="ProfileType">
              <xs:annotation>
                   <xs:documentation>
              1.Profile IS USED TO BE AN WRAPPER ELEMENT FOR ALL KIND OF PROFILES NO MATTER WHAT KIND OF PROFILE IT IS
              2.ProfileID used to uniquely identify the current profile
              3.ProfileData used to hold all the necessary profile related data
              </xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="ProfileID" type="ProfileIDType">
                        <xs:annotation>
                             <xs:documentation>this will hold all the common attributes, espically the global unique identifier to the profile, no matter what type of profile is</xs:documentation>
                        </xs:annotation>
                   </xs:element>
                   <xs:element name="ProfileData" type="ProfileDataType">
                        <xs:annotation>
                             <xs:documentation>all the non-common profile meta data that attached to each specific profile type such as IIPProfile, OrchestrationProfile, and BizOperationProfile will be placed here</xs:documentation>
                        </xs:annotation>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="ProfileIDType">
              <xs:annotation>
                   <xs:documentation>global unique identifier and all the common attributes across all different profiles, the @ID and @Type together will be used as the primary key to identify the profile data</xs:documentation>
              </xs:annotation>
              <xs:attribute name="ID" type="xs:ID" use="required">
                   <xs:annotation>
                        <xs:documentation>ID is the global unique identifier to the profile, no matter what type of profile it is</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
              <xs:attribute name="Name"/>
              <xs:attribute name="Description"/>
              <xs:attribute name="Version">
                   <xs:annotation>
                        <xs:documentation>version of the profile data</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
              <xs:attribute name="Type" type="ProfileTypeType" use="required">
                   <xs:annotation>
                        <xs:documentation>value to identify the ProfileType type within
                        IIPProfile,BizOperationProfile,OrchestrationProfile,DomainObjectProfile
                        ServiceProfile,ExceptionProfile,SystemProfile,HL7XMLSchemaProfile,
                        EnricherParametersProfile,CustomizedProfile
                        </xs:documentation>
                   </xs:annotation>
              </xs:attribute>
              <xs:attribute name="Status" type="StatusType" default="ACTIVE">
                   <xs:annotation>
                        <xs:documentation>used to show the related profile data status like "ACTIVE","PENDING","VOID"...</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
              <!--
              <xs:sequence>
                   <xs:element name="ProfileReference" type="ProfileIDType" minOccurs="0" maxOccurs="unbounded">
                        <xs:annotation>
                             <xs:documentation>this will be the place to hold the integrity relationship with other profiles like foreign key if existed and necessary to show up</xs:documentation>
                        </xs:annotation>
                   </xs:element>
              </xs:sequence>
              -->
         </xs:complexType>
         <xs:complexType name="ProfileDataType">
              <xs:annotation>
                   <xs:documentation>meta data associated tightly to each specific type of profile</xs:documentation>
              </xs:annotation>
              <xs:choice>
                   <xs:element name="EnricherParametersProfileData" type="EnricherParametersDataType">
                        <xs:annotation>
                             <xs:documentation>Enricher Parameters related profile data
                   1. one instance of this type may contains all the related System metadata.
                   2. idType part may use to identify different version/release/status
                   </xs:documentation>
                        </xs:annotation>
                   </xs:element>
                   <xs:element name="ExtendProfileData" type="ExtendProfileDataType">
                        <xs:annotation>
                             <xs:documentation>If needed, any profile data not defined within the current release scope can be added here </xs:documentation>
                        </xs:annotation>
                   </xs:element>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="ExtendProfileDataType">
              <xs:sequence>
                   <xs:element name="ExtendProfile" type="xs:anyType" minOccurs="0"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="EnricherParametersDataType">
              <xs:sequence>
                   <xs:element name="EnricherParameter" type="EnricherParameter" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="EnricherParameter">
              <xs:sequence>
                   <xs:element ref="Enricher"/>
              </xs:sequence>
              <xs:attribute name="serviceName" type="xs:string" use="required"/>
              <xs:attribute name="interactionID" type="xs:string"/>
         </xs:complexType>
         <xs:element name="Enricher">
              <xs:annotation>
                   <xs:documentation>Comment describing your root element</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Parameters" type="Parameters"/>
                        <xs:element ref="Section" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:complexType name="ValueType">
              <xs:attribute name="field" use="required"/>
              <xs:attribute name="value"/>
              <xs:attribute name="action"/>
         </xs:complexType>
         <xs:element name="Section">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Value" type="ValueType" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="Section" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
                   <xs:attribute name="path" use="required"/>
              </xs:complexType>
         </xs:element>
         <xs:complexType name="Parameters">
              <xs:sequence>
                   <xs:element name="Parameter" minOccurs="0" maxOccurs="unbounded">
                        <xs:complexType>
                             <xs:attribute name="name" use="required"/>
                             <xs:attribute name="reference"/>
                        </xs:complexType>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RuleList">
              <xs:annotation>
                   <xs:documentation>an array of rules</xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="Rule" type="RuleProfile" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RuleProfile">
              <xs:attribute name="RName" use="required"/>
              <xs:attribute name="RType" type="RuleType" use="required"/>
              <xs:attribute name="Status" default="ON">
                   <xs:annotation>
                        <xs:documentation>By default is ON (or if is missing)</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
              <xs:attribute name="Order"/>
              <xs:attribute name="Direction" type="RouteDirect">
                   <xs:annotation>
                        <xs:documentation>Request / Reply</xs:documentation>
                   </xs:annotation>
              </xs:attribute>
         </xs:complexType>
         <!-- ************** PART II: END COMPLEX OBJECT TYPE DEFINITIONS *********************************** -->
         <!-- ************** PART III: BEGIN ROOT ELEMENTS DEFINITIONS ********************************* -->
         <!-- 0) Profile wrapper root element
    Profile IS USED TO BE AN WRAPPER ELEMENT FOR ALL KIND OF PROFILES NO MATTER WHAT KIND OF PROFILE IT IS
    -->
         <xs:element name="Profile" type="ProfileType">
              <xs:annotation>
                   <xs:documentation>Profile IS USED TO BE AN WRAPPER ELEMENT FOR ALL KIND OF PROFILES NO MATTER WHAT KIND OF PROFILE IT IS</xs:documentation>
              </xs:annotation>
         </xs:element>
    </xs:schema>
    2)register xml schema:
    SQL> begin
    2 dbms_xmlschema.registerSchema
    3 (
    4 schemaurl=>'http://rac3-1-vip:8080/home/'||USER||'/xsd/EHIPProfile_v00.xsd',
    5 schemadoc=>xdbURIType('/home/'||USER||'/xsd/EHIPProfile_v00.xsd').getClob(),
    6 local=>True,
    7 gentypes=>True,
    8 genbean=>False,
    9 gentables=>False
    10 );
    11 End;
    12 /
    PL/SQL procedure successfully completed.
    SQL>
    SQL>
    3) xml data:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy v2007 sp2 (http://www.altova.com)-->
    <Profile xmlns="http://www.emergis.com/eHealth/EHIP/data/meta/profile:v1">
         <ProfileID Type="EnricherParametersProfile" Status="ACTIVE" ID="EnricherPP.ID.0001" Name="EnricherPP.ID.0001" Description="EnricherPP.ID.0001" Version="01"/>
         <ProfileData>
              <EnricherParametersProfileData>
                   <EnricherParameter serviceName="LRS_BusinessDomainObject.lrs.businessDomainObject.domainObjectBuilder.concrete.ExceptionCreators:createExceptionV50CategoryCanonicalPart" interactionID="">
                   <Enricher>
                        <Parameters>
                             <Parameter name="MESSAGE_ID" reference="test"/>
                        </Parameters>
                        <Section path="HEADER">
                             <Section path="RESPONSE_TYPE">
                                  <Value field="value" value="I"/>
                             </Section>
                             <Section path="HL7_STANDARD_VERSION">
                                  <Value field="value" value="HL7V3"/>
                             </Section>
                             <Section path="DESIRED_ACKNOWLEDGMENT_TYPE">
                                  <Value field="value" value="NE"/>
                             </Section>
                             <Section path="SENDING_NETWORK_ADDRESS">
                                  <Value field="value" value=""/>
                             </Section>
                             <Section path="SENDING_APPLICATION_IDENTIFIER">
                                  <Value field="root" value="2.16.840.1.113883.3.133.1.3"/>
                                  <Value field="extension" value=""/>
                             </Section>
                             <Section path="SENDING_APPLICATION_NAME">
                                  <Value field="value" value="NL HIAL"/>
                             </Section>
                        </Section>
                   </Enricher>
         </EnricherParameter>
              <EnricherParameter serviceName="LRS_BusinessDomainObject.lrs.businessDomainObject.domainObjectBuilder.concrete.DomainObjectCreators:createFindClientsAssociatedIdentifersRequestObject" interactionID="PRPA_IN101105CA">
                   <Enricher>
                        <Parameters>
                             <Parameter name="MESSAGE_ID" reference="test"/>
                        </Parameters>
                        <Section path="HEADER">
                             <Section path="RESPONSE_TYPE">
                                  <Value field="value" value="I"/>
                             </Section>
                             <Section path="HL7_STANDARD_VERSION">
                                  <Value field="value" value="HL7V3"/>
                             </Section>
                             <Section path="PROCESSING_CODE">
                                  <Value field="value" value="T"/>
                             </Section>
                             <!--
                             <Section path="PROCESSING_MODE_CODE">
                                  <Value field="value" value="T"/>
                             </Section>
                             -->                         
                             <Section path="DESIRED_ACKNOWLEDGMENT_TYPE">
                                  <Value field="value" value="NE"/>
                             </Section>
                             <Section path="RECEIVER_NETWORK_ADDRESS">
                                  <Value field="value" value="prsunew.moh.hnet.bc.ca"/>
                             </Section>
                             <Section path="RECEIVER_APPLICATION_IDENTIFIER">
                                  <Value field="root" value="2.16.840.1.113883.3.40.5.1"/>
                                  <Value field="extension" value=""/>
                             </Section>
                             <Section path="SENDING_NETWORK_ADDRESS">
                                  <Value field="value" value=""/>
                             </Section>
                             <Section path="SENDING_APPLICATION_IDENTIFIER">
                                  <Value field="root" value="2.16.840.1.113883.3.133.1.3"/>
                                  <Value field="extension" value=""/>
                             </Section>
                             <Section path="SENDING_APPLICATION_NAME">
                                  <Value field="value" value="NL HIAL"/>
                             </Section>
                        </Section>
                   </Enricher>
         </EnricherParameter>
              <EnricherParameter serviceName="LRS_BusinessDomainObject.lrs.businessDomainObject.domainObjectBuilder.concrete.DomainObjectContentEnrichers:enrichPRRequest" interactionID="">
    <!--Sample XML file generated by XMLSpy v2007 sp2 (http://www.altova.com)-->
    <Enricher>
         <Parameters>
              <Parameter name="MESSAGE_IDENTIFIER" reference="test"/>
         </Parameters>
         <Section path="HEADER">
              <Section path="HL7_STANDARD_VERSION">
                   <Value field="value" value="V3PR2"/>
              </Section>
              <!--POS/CPP populated ?-->
              <!--Not sure if this should be set as a variance within EHIP or if we expect the POS/CPP to provide this value-->
              <Section path="PROCESSING_CODE">
                   <Value field="value" value="T"/>
              </Section>
              <!--POS/CPP populated ?-->
              <Section path="PROCESSING_MODE_CODE">
                   <Value field="value" value="T"/>
              </Section>
              <!--POS/CPP populated ?-->
              <Section path="DESIRED_ACKNOWLEDGMENT_TYPE">
                   <Value field="value" value="NE"/>
              </Section>
              <!-- note:We Expect PRS to give us a web service address -->                    
              <!--<Section path="RECEIVER_NETWORK_ADDRESS">
                   <Value field="value" value="_http://PRSServer/svcName"/>
              </Section>
              -->
              <Section path="RECEIVER_APPLICATION_IDENTIFIER[0]">
                   <Value field="root" value="2.16.840.1.113883.3.40.1.14"/>
                   <Value field="extension" value="SIT1"/>
              </Section>
              <!-- note: values of the fields to be provided by PRS -->
              <Section path="RECEIVER_APPLICATION_NAME[0]">
                   <Value field="value" value="receiverAppName"/>
              </Section>
              <!-- note: RECEIVER_ORGANIZATION has an extra trailing space, as in the Excel mapping spreadsheet -->
              <!-- note: values of the fields to be specified by PRS later -->
              <Section path="RECEIVER_AGENT/RECEIVER_ORGANIZATION/RECEIVER_ORGANIZATION_IDENTIFIER[0]">
                   <Value field="root" value="2.16.840.1.113883.3.40.4.1"/>
                   <Value field="extension" value="receiverOrgId"/>
              </Section>
              <Section path="SENDING_APPLICATION_NAME[0]">
                   <Value field="value" value="NLPRSCLNT"/>
              </Section>
              <!-- note: SENDING_ORGANIZATION has an extra trailing space, as in the Excel mapping spreadsheet -->
              <!-- note: values of the fields to be specified by PRS later -->
              <Section path="SENDING_AGENT/SENDING_ORGANIZATION/SENDING_ORGANIZATION_IDENTIFIER[0]">
                   <Value field="root" value="2.16.840.1.113883.4.3.57"/>
                   <Value field="extension" value="3001"/>
              </Section>
              <Section path="PERFORMER/HEALTHCARE_WORKER_IDENTIFIER[0]">
                   <Value field="root" value="2.16.840.1.113883.4.3.57"/>
                   <Value field="extension" value="HIAL_USR"/>
              </Section>          
         </Section>
         <Section path="PAYLOAD">
              <!--<Section path="QUERY_STATUS_CODE">
                   <Value field="value" value="New"/>
              </Section>-->
              <!-- note: AUDIT has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="AUDIT[0]/AUDIT_INFORMATION">
                   <Value field="code" value="LATEST"/>
                   <Value field="codeSystem" value="PRSAuditParameters"/>
              </Section>
              <!-- note: CONFIDENCE has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="CONFIDENCE/CONFIDENCE_VALUE">
                   <Value field="value" value="100"/>
              </Section>
              <!-- note: HISTORY has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="HISTORY/INCLUDE_HISTORY_INDICATOR">
                   <Value field="value" value="false"/>
              </Section>
              <!-- note: JURISDICTION has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="JURISDICTION/JURISDICTION_TYPE">
                   <Value field="value" value="NL"/>
              </Section>
              <!-- note: RESPONSE_OBJECT has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[0]">
                   <Value field="code" value="GRS_ADDRESS"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[1]">
                   <Value field="code" value="GRS_ELECTRONIC_ADDRESS"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[2]">
                   <Value field="code" value="GRS_IDENTIFIER"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[3]">
                   <Value field="code" value="GRS_ORGANIZATION_NAME"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[4]">
                   <Value field="code" value="GRS_PERSONAL_NAME"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[5]">
                   <Value field="code" value="GRS_REGISTRY_IDENTIFIER"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[6]">
                   <Value field="code" value="GRS_TELEPHONE"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[7]">
                   <Value field="code" value="PRS_CONDITION"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[8]">
                   <Value field="code" value="PRS_CONFIDENTIALITY_INDICATOR"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[9]">
                   <Value field="code" value="PRS_DEMOGRAPHIC_DETAIL"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[10]">
                   <Value field="code" value="PRS_DISCIPLINARY_ACTION"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[11]">
                   <Value field="code" value="PRS_INFORMATION_ROUTE"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[12]">
                   <Value field="code" value="PRS_NOTE"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[13]">
                   <Value field="code" value="PRS_PROVIDER_CREDENTIAL"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[14]">
                   <Value field="code" value="PRS_PROVIDER_EXPERTISE"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[15]">
                   <Value field="code" value="PRS_PROVIDER_RELATIONSHIP"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[16]">
                   <Value field="code" value="PRS_STATUS"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[17]">
                   <Value field="code" value="PRS_WORK_LOCATION"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[18]">
                   <Value field="code" value="PRS_WORK_LOCATION_ADDRESS"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[19]">
                   <Value field="code" value="PRS_WORK_LOCATION_DETAIL"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[20]">
                   <Value field="code" value="PRS_WORK_LOCATION_ELECTRONIC_ADDRESS"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[21]">
                   <Value field="code" value="PRS_WORK_LOCATION_INFORMATION_ROUTE"/>
              </Section>
              <Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[22]">
                   <Value field="code" value="PRS_WORK_LOCATION_TELEPHONE"/>
              </Section>
              <!-- note: ROLE_CLASS has an extra trailing space, as in the Excel mapping spreadsheet -->
              <Section path="ROLE_CLASS /ROLE_CLASS_VALUE">
                   <Value field="value" value="LIC"/>
              </Section>
              <Section path="SORT_CONTROL[0]/SORT_CONTROL_ELEMENT_NAME">
                   <Value field="code" value="PrincipalPerson.name.value.family"/>
              </Section>
              <Section path="SORT_CONTROL[0]/SORT_CONTROL_DIRECTION_CODE">
                   <Value field="value" value="A"/>
              </Section>
         </Section>
    </Enricher>
         </EnricherParameter>
              </EnricherParametersProfileData>
         </ProfileData>
    </Profile>
    the data is valid against the schema through XML Spy tool... and loaded into the XDB repository...
    4) create table and insert data:
    SQL> CREATE TABLE EHIP_PROFILE OF SYS.XMLTYPE
    2 XMLSCHEMA "http://rac3-1-vip:8080/home/EHIPSBUSER1/xsd/EHIPProfile_v00.xsd" ELEMENT "Profile"
    3 ;
    Table created.
    SQL>
    SQL> alter table EHIP_PROFILE
    2 add CONSTRAINT EHIP_PROF_PK PRIMARY KEY(XMLDATA."ProfileID"."ID",XMLDATA."ProfileID"."Type");
    Table altered.
    SQL>
    SQL>
    SQL>
    SQL>
    SQL> select xdbURIType('/home/'||USER||'/ProfileData/EnricherPP.ID.0001.xml').getClob() from dual;
    XDBURITYPE('/HOME/'||USER||'/PROFILEDATA/ENRICHERPP.ID.0001.XML').GETCLOB()
    <?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy
    SQL>
    SQL>
    SQL> insert into ehip_profile values(xmltype.createXML(xdbURIType('/home/'||USER||'/ProfileData/EnricherPP.ID.0001.xml').getClob()));
    insert into ehip_profile values(xmltype.createXML(xdbURIType('/home/'||USER||'/ProfileData/EnricherPP.ID.0001.xml').getClob()))
    ERROR at line 1:
    ORA-21700: object does not exist or is marked for delete
    what's the problem caused the "ORA-21700: object does not exist or is marked for delete" error?
    Thanks in advance for your help?

    Thanks Marco,
    Here're my environment:
    SQL> select INSTANCE_NUMBER, INSTANCE_NAME,HOST_NAME,VERSION from v$instance;
    INSTANCE_NUMBER INSTANCE_NAME HOST_NAME VERSION
    2 rac32 RAC3-2 10.2.0.3.0
    I followed your suggested in the above, and always purge recyclebin, but still got the same problem. because in 10gr2, there's no dbms_xmlschema.purge_schema available,
    and I did checked the recyclebin after force the delete of schema, nothing inside. any other recommendation?

Maybe you are looking for

  • Mid 2010 iMac Wifi signal strength issue

    I am having issues maintaining a robust Wifi signal on my 21.5 inch 2010 iMac with 10.6.5 installed. my symptoms are very similar to what is described in this post: http://discussions.apple.com/thread.jspa?threadID=2596933&tstart=0 in addition to tha

  • Export then Import to a different Hyper-V server

    In http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/85dc7d36-491f-4b02-88ac-63c1ed0d94db I described a problem when exporting from a Hyper-V server and trying to import into a different Hyper-V server in a different domain. The

  • Which HD codec to use?

    Hello! Its been a long, long time since my last confession, but since I'm here... I'm building an animated storyboard in FCP from very large scans. Delivering to HD Quicktime and SD DVD. Want to work in 1080p or 720p - what kind of timeline do you re

  • Compiled language with similar feel to php?

    I have written several utilities for my album program in php, but this means that if I give them to anyone else they have to install php before they can use them on their own computers. I have never used C++, but the philosophy behind php seems to be

  • How to find implemented user exits

    Hi, How to find out which user exits have been implemented foe a transaction. Lets say VA01. I have to check the user exits implemented. Kindly help. Moderator Message: FAQ. Please search before posting your question. Thread locked. Edited by: Suhas