Help needed regarding insertion of data into oracle

Hi,
I am student currently trying to do a project to up a semantic database using oracle. Have set up the semantic technologies for oracle 11gr2 and used the jena adapter to load an owl into oracle.
But i am not sure how do i insert sample data that could reference the owl.
Tried searching but unable to find any simple tutorial and have also looked through the developer's guide and also jenaadaptor guide.
Is there any tutorials available that could help? thank you

Hi,
Please go to the OTN site for more information:
http://www.oracle.com/technology/tech/semantic_technologies/index.html
There you can find some training info (try the NCI Oracle By Example, it's a good tutorial):
http://www.oracle.com/technology/tech/semantic_technologies/htdocs/semtech_training.html
Regards,
Vladimir

Similar Messages

  • Steps to insert xml data into oracle

    Please give me next steps to insert xml data into oracle 9i:
    i've been doing this steps :
    1. create folder in oracle port:8080
    2. copy xsd into folder
    3. register schema
    4. Give me next step...
    5.
    6.
    Thanks

    this is my complete xmlschema
    <?xml version = "1.0" encoding = "UTF-8"?>
    <xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema">
         <xs:element name = "A3A8Vers" type = "xs:string"/>
         <xs:element name = "F1F5Vers" type = "xs:string">
         </xs:element>
         <xs:element name = "sequence" type = "xs:string">
         </xs:element>
         <xs:element name = "amf" type = "xs:string">
         </xs:element>
         <xs:element name = "trnsKeyNumber" type = "xs:string">
         </xs:element>
         <xs:element name = "mac" type = "xs:string">
         </xs:element>
         <xs:element name = "encryptionKey" type = "xs:string">
         </xs:element>
         <xs:element name = "signature" type = "xs:string">
         </xs:element>
         <xs:element name = "signer">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref = "entityNumber"/>
                        <xs:element ref = "keyNumber"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name = "entityNumber" type = "xs:string">
         </xs:element>
         <xs:element name = "keyNumber" type = "xs:string">
         </xs:element>
         <xs:element name = "pblKey">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref = "entityNumber"/>
                        <xs:element ref = "entityRole"/>
                        <xs:element ref = "keyNumber"/>
                        <xs:element ref = "publicKeyVal"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name = "ntrTime" type = "xs:string">
         </xs:element>
         <xs:element name = "deActionTime" type = "xs:string">
         </xs:element>
         <xs:element name = "actionTime" type = "xs:string">
         </xs:element>
         <xs:element name = "entityRole">
              <xs:complexType>
                   <xs:attribute name = "role" default = "INVALID">
                        <xs:simpleType>
                             <xs:restriction base = "xs:NMTOKEN">
                                  <xs:enumeration value = "TKD"/>
                                  <xs:enumeration value = "SKD"/>
                                  <xs:enumeration value = "INVALID"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:attribute>
              </xs:complexType>
         </xs:element>
         <xs:element name = "publicKeyVal">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref = "exponent"/>
                        <xs:element ref = "mod"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name = "exponent" type = "xs:string">
         </xs:element>
         <xs:element name = "mod" type = "xs:string">
         </xs:element>
         <xs:element name = "encriptionTransKey" type = "xs:string">
         </xs:element>
         <xs:element name = "keyType" type = "xs:string">
         </xs:element>
    </xs:schema>.
    I use command to create table :
    create table elements of xmltype
    xmlschema "http://192.168.1.1:8080/test.xsd"
    element "publicKey"
    . But why the result,table as object type. so i cant use command "desc <table_name>;"

  • Help need on inserting system date on database

    hello every body,
    I need to insert system date into database through prepared statement.
    i wrote code :
    java.util.Date d=new java.util.Date();
    Preparestatement psmt;
    psmt.setDate(8, java.sql.Date(d));
    am getting class cast exception :
    could u please tell me how to insert system date through prepared statement..
    thanks in advance..

    Surround your code with a
    try{
    //Insert date here
    catch(Exception e){
    //handle exceptions here
    e.printStackTrace();
    Who says he didn't already?
    Try this:
    java.util.Date d=new java.util.Date();
    >
    Preparestatement psmt;
    psmt.setDate(8, new
    java.sql.Date(d.getTime()));This is correct, but can be condensed (if you want)
    psmt.setDate(8, new java.sql.Date(new java.util.Date().getTime()));
    >
    It's good idea to use the JDBC escape function
    instead of using a specific DBMS function. This way,
    your code will be portable.
    sql = "INSERT INTO USERS VALUES("
    + "'" + userName + "'" + ","
    + "'" + userPw   + "'" + ","
    + "  {fn now() }  )"; e Real's How To
    (http://64.18.163.122/rgagnon/javadetails/java-0567.ht
    ml)
    And this is only marginally applicable.  If he wishes to use the same statement for the current date, as well as other dates, he cannot make use of this.  Of course, I don't really know if I would trust or recommend a tutorial site that advocates building statements that are screaming for injection attack attempts.
    Edit:  Too slow by a mile!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Need help to upload Excel Chinese data into Oracle

    Hello
    I am very new at internationalization. We are writing an application that
    reads Chinese data from a Microsoft Excel file and writes it out into Oracle
    8i. This is what we have done:
    1. Use JDBC-ODBC driver to read the Excel data directly from .xls.
    2. Write data into oracle database.
    When we open Excel, we can view the Chinese characters. When we use SQL
    PLus, we see only ????. When we write another servlet to retrieve the data,
    it is displayed as ????. The few questions I have are:
    1. How can I verify that the Chinese data has been accurately inserted into
    the database?
    2. Do I need to set anything special (environment variables, config files
    etc) in BEA Weblogic 5.1 and Oracle 8i?
    The environment we have are:
    1. BEA Weblogic SP9 running on WIn NT.
    2. Oracle 8i running on Solaris.
    Thanks

    Make sure that the characters are correct in the app server after you get
    them out of Oracle and before you put them into the web page. This will help
    you determine if the problem is in the JDBC access to Oracle or the encoding
    into the web page. Make sure that you verify that the hex values of each
    character from the db test case are what you expect.
    Peace,
    Cameron Purdy
    Tangosol Inc.
    << Tangosol Server: How Weblogic applications are customized >>
    << Download now from http://www.tangosol.com/download.jsp >>
    "Bernard Ong" <[email protected]> wrote in message
    news:[email protected]...
    Hi Kev
    1. "It doesn't work" means that I still see ??? in the database. WHen I
    retrieve the data, it is still displayed as ??? in a browser.
    2. Codeset to use to display should be UTF-8.
    3. Charset in database server is UTF8. I did a "select * from
    database_parameters" to get this value.
    4. I copied the Chinese characters from Excel and pasted on Notepad. Icould
    see the Chinese characters with the Chinese emulator turned on. WHen Icopy
    ??? from SQL*Plus and paste it into notepad, I see ???.
    Presume:
    1. Yes, running SQL*PLUS on BEA machine.
    2. BEA machine running on WIndows 200 professional. We downloaded aChinese
    emulator. WIndows 2000 is the English version.
    Cheers
    "Kevin Lu" <[email protected]> wrote in message
    news:[email protected]...
    Hi Bernard,
    Please first clarify:-
    1) "It doesn't work" means... cannot display the chinese character as
    you
    desired?
    2) Which codeset that you want it to display, Chinese traditional big5?UTF-8,
    i would think it's still in Java/JDBC codeset.
    3) What's the charset in the database server? Get help from DBA if you
    not
    sure
    how to obtain this information.
    4) Try paste the result(select via SQL*Plus) onto Win Notepad, what's
    the
    outcome?
    Presume:
    1) you're running SQL*Plus on your BEA machine?
    2) BEA machine is running on Chinese O/S or hv NJStar installed andrunning?
    Let me know if i could be of further help.
    -Kev
    "Bernard Ong" <[email protected]> wrote:
    Thanks Kev.
    We had changed the registry in the BEA machine to
    AMERICAN_AMERICA.UTF8.
    THis was done for the Oracle registry in the BEA machine.
    Unfortunately,
    it
    still doesn't work.
    Cheers,
    Bernard
    "Kevin Lu" <[email protected]> wrote in message
    news:[email protected]...
    Hi Bernard,
    I take about the same approach as you while resolving codeset
    problem.
    So,
    first
    i make sure SQL*Plus could display my desired result before proceedto
    application(be
    it Swing, servlet, JSP console etc..). You may try set the NLS_LANGon
    your client
    machine(same machine as where you run SQL*Plus) to the SAME as
    database
    server
    character set, for instance America_American.US7ASCII. You should
    able
    to
    see
    the Chinese characters.
    Hope this help with your first question. I can't help for the restanyway.
    good luck!
    -Kev
    "Bernard Ong" <[email protected]> wrote:
    Hello
    I am very new at internationalization. We are writing an
    application
    that
    reads Chinese data from a Microsoft Excel file and writes it outinto
    Oracle
    8i. This is what we have done:
    1. Use JDBC-ODBC driver to read the Excel data directly from .xls.
    2. Write data into oracle database.
    When we open Excel, we can view the Chinese characters. When we useSQL
    PLus, we see only ????. When we write another servlet to retrievethe
    data,
    it is displayed as ????. The few questions I have are:
    1. How can I verify that the Chinese data has been accurately
    inserted
    into
    the database?
    2. Do I need to set anything special (environment variables, configfiles
    etc) in BEA Weblogic 5.1 and Oracle 8i?
    The environment we have are:
    1. BEA Weblogic SP9 running on WIn NT.
    2. Oracle 8i running on Solaris.
    Thanks

  • Insert XML data into oracle table

    I want to insert xml data returned by the VB code into oracle table.
    As a prequisite I have installed the XDK capabilities for Oracle by installing JServer & running
    SQL scripts catxsu.sql,xmlparserv2.jar,load.sql to load the XMLSQL Utility (DBMS_XMLQuery) into the database.
    I have also granted following privileges to the user.
    Grant users access to XMLParser and XMLDom packages:
         grant execute on xmldom to public;
         grant execute on xmlparser to public;
         create public synonym xmldom for sys.xmldom;
         create public synonym xmlparser for sys.xmlparser;
    But still i am not able to create procedure which will accept input parameter as an XML document coming from front end which in turn will insert that record into simple oracle table . I am using Oracle 8.1.7
    Thanks in advance

    Would you specify the database version?
    Since DBMS_XMLSave requires DOM, you normally need to divide the huge XML before insertion.

  • Insert Excel data into Oracle

    I am having the following code in Button-Press-Event for inserting the data from the selected Excel sheet. My problem is only the last row of the Excel file is store in Oracle Table. Others are not at all coming. Anybody having idea on this....?
    DECLARE
         M_APPID PLS_INTEGER;
         M_CONVID PLS_INTEGER;
         M_BUFFER VARCHAR2(240);
         M_CNT NUMBER;
         M_ROW NUMBER;
         M_COL NUMBER;
         M_ROWID NUMBER := 0;
         M_ERROR CHAR;
         M_EXCEL_FILE VARCHAR2(2000);
         M_EXIT_FLAG CHAR(1);
    BEGIN
         SET_ITEM_PROPERTY('M_PROCESSING_INFO',VISUAL_ATTRIBUTE,'BP_LOOK');
    :M_PROCESSING_INFO := 'Validating file, please wait...';
         SYNCHRONIZE;
    SET_ITEM_PROPERTY('M_BTN_PREVIEW',ENABLED,PROPERTY_FALSE);
         L_VALIDATE_FILE_EXISTENCE;
         GO_BLOCK('OW_EXCEL_UPLOAD');
         CLEAR_BLOCK(NO_VALIDATE);
         GO_BLOCK('OT_EXCEL_ERROR_LOG');
         CLEAR_BLOCK;
    SET_BLOCK_PROPERTY('OW_EXCEL_UPLOAD',UPDATE_ALLOWED,PROPERTY_FALSE);
    SET_BLOCK_PROPERTY('OW_EXCEL_UPLOAD',DELETE_ALLOWED,PROPERTY_FALSE);
    SET_BLOCK_PROPERTY('OW_EXCEL_UPLOAD',INSERT_ALLOWED,PROPERTY_TRUE);
         GO_ITEM('OW_EXCEL_UPLOAD.OU_ROW_NO');
         M_APPID := DDE.APP_BEGIN(M_EXCEL_FILE|| ' '||CHR(34)||:P_TXT_FILE_NAME||CHR(34), DDE.APP_MODE_MINIMIZED);
         M_CONVID := DDE.INITIATE('EXCEL', :P_TXT_FILE_NAME);
         FIRST_RECORD;
         M_CNT := 0;
         FOR M_ROW IN :M_START_ROW .. :M_END_ROW LOOP
              M_ROWID := M_ROWID + 1;
              FOR M_COL IN :M_START_COL .. :M_END_COL LOOP
                   INSERT INTO TEMP VALUES (M_ROWID, M_COL);
                   M_BUFFER := '';
                   M_CNT := M_CNT + 1;     
                   :M_PROCESSING_INFO := 'Processing R'||M_ROW||'C'||M_COL;
                   SYNCHRONIZE;
                   DDE.REQUEST(M_CONVID, 'R'||M_ROW||'C'||M_COL, M_BUFFER, DDE.CF_TEXT, 240);
                   M_BUFFER := RTRIM(LTRIM(M_BUFFER));
                   M_BUFFER := SUBSTR(M_BUFFER,0,LENGTH(M_BUFFER)-2);
                   :M_PROCESSING_INFO := 'Processed R'||M_ROW||'C'||M_COL;
                   SYNCHRONIZE;
                   IF M_BUFFER IS NULL AND M_COL = 1 THEN
                        M_EXIT_FLAG := 'Y';
                        EXIT;
                   END IF;
    COPY(M_ROWID,'OW_EXCEL_UPLOAD.OU_ROW_NO');
    BEGIN
    IF M_COL = 1 THEN
         :EXU_CONT_NO := M_BUFFER;
    ELSIF M_COL = 2 THEN
         :EXU_LOT_NO := M_BUFFER;
    ELSIF M_COL = 3 THEN
         :EXU_PART_NO := M_BUFFER;
    ELSIF M_COL = 4 THEN
         :EXU_QTY := TO_NUMBER(M_BUFFER);
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    L_SAVE_ERROR_LOG(:P_TXT_FILE_NAME,M_ROW,M_BUFFER,L_ERR_DESC(3107));
    GO_BLOCK('OT_EXCEL_ERROR_LOG');
    EXECUTE_QUERY;
    END;
    END LOOP;          
              CREATE_RECORD;
              M_CNT := 0;
              IF M_EXIT_FLAG = 'Y' THEN
                   EXIT;
              END IF;
         END LOOP;
         :M_RECORD_CNT := M_ROWID - 1;
         DDE.TERMINATE(M_CONVID);
         DDE.APP_END(M_APPID);
         FIRST_RECORD;
    COMMIT;
              :M_PROCESSING_INFO := 'Data in the Excel Sheet uploaded into the System.';
              SYNCHRONIZE;     
         GO_BLOCK('OW_EXCEL_UPLOAD');
    EXECUTE_QUERY;
    END;
    Note:
    My temp table is having exact number of rows as in Excel sheet.

    Have you used the debugger and single stepped through the code to see where the problem is?

  • Urgent - pls help - Problem while inserting binary file into Oracle DB

    Hi,
    I am trying to insert binary files into a Blob column in a Oracle 10G table.
    The binary files would be uploaded by the web users and hence come as multipart request. I use apache commons upload streaming API to handle it. Finally i am getting a input stream of the uploaded file.
    The JDBC code is
    PreparedStatement ps=conn.prepareStatement("insert into bincontent_table values(?)");
    ps.setBinaryStream(1,inStream,length);
    My problem starts when i try to find the length of the stream. available() method of inputstream does not return the full length of the stream. so i put a loop to read thru the stream and find the length as shown below
    int length=0;
    while((v=inStream.read())!=-1)
    length++;
    Now, though i got the length, my stream pointer has reached the end and i cant reset it(it throws an error if i try).
    So i copied the stream content to a byte array and created an ByteArrayInputStream like this.
    tempByteArray=new byte[length];
    stream.read(tempByteArray,0,length);
    ByteArrayInputStream bais=new ByteArrayInputStream(tempByteArray);
    Now if i pass this bytearray input stream instead of the normal input stream to the prepared statement's setBinaryStream() method it throws an error as
    "ORA-01460: unimplemented or unreasonable conversion requested".
    Now how to solve this?
    My doubts are ,
    1) preparedStatement.setBinaryStream(int parameterIndex, InputStream x, int length) expects an inputstream and its length. if i have the stream how to find its length with out reading the stream?
    2) Also as the length parameter is a integer, what if i have a large binary file whose length runs more than the capacity of integer
    3) Alternatively there is a setBlob(int i, Blob x) in prepared statement. But how to instantiate a Blob object and set it here
    4) Is there any better way to do this.
    Thanks in advance

    "ORA-01460: unimplemented or unreasonable conversion
    requested".When the setBinaryStream method is used, the driver may have to do extra work to determine whether the parameter data should be sent to the server as a LONGVARBINARY or a BLOB (reference: javadoc)
    1) preparedStatement.setBinaryStream(int parameterIndex,
    InputStream x, int length) expects an inputstream and its length. if i
    have the stream how to find its length with out reading the stream?no. stream may have no specified length. i think you have wrong understanding about stream.
    2) Also as the length parameter is a integer, what if i have a large
    binary file whose length runs more than the capacity of integer
    3) Alternatively there is a setBlob(int i, Blob x) in prepared statement.
    But how to instantiate a Blob object and set it here
    4) Is there any better way to do this.use ps.setBlob(1, instream) instead

  • Help needed badly Insert text data from xml files into tables

    Hi all, I have asked to do insertion of text from a xml file into tables upon receiving using pro*c. i've done quite an amount of research on xml parser in c but there wasn't much information for mi to use for implementation...
    Guys don't mind helping me to clarify few doubts of mine...
    1. Where can i get the oracle xml parser libs? Is it included when i installed oracle 8i?
    2. Is there any tutorials or help files for xml parser libs where i can read up?
    I need the xml parser to recognise the tags, followed by recognising the text after the tags.
    eg. xml format
    <studentID> 0012 </studentID>
    <student> john </student>
    <studentID> 0013 </studentID>
    <student> mary </student>
    text willl be inserted into tables like this:
    studentID | student
    0012 | john
    0013 | mary
    by the way i'm using oracle 8i on HP-UX. Thanks in advance.

    I can answer one of of your questions at least
    1. Where can i get the oracle xml parser libs? Is it included when i installed oracle 8i?You need the XML XDK. You can use http://www.oracle.com/technology/tech/xml/xdkhome.html as your starting point. I believe the 9i version works for 8i.
    I have no pro*c experience so I can't offer any other suggestions regarding how to do this in pro*c.

  • Issue inserting UTF8 data into Oracle in windows environment.

    I have a UTF8 PHP application that is writing a string containing special characters to oracle through a ODBC connection. The Oracle database is setup for UTF8 support.
    Here is the issue. I have a simple string, "louis de funès". When the data manually moved correctly in UTF8 the data comes up correctly. The Oracle dump() shows:
    WORKING DATA:
    String: louis de funès
    select keywords, dump(keywords, 17) from ame_links where keywords like '%louis de %';
    Typ=1 Len=15: l,o,u,i,s, ,d,e, ,f,u,n,c3,a8,s
    However, when the same string is Inserted through the PHP application the data shows up in the db like this.
    NOT - WORKING:
    String: louis de funès
    select keywords, dump(keywords, 17) from ame_links where keywords like '%louis de %';
    Typ=1 Len=17: l,o,u,i,s, ,d,e, ,f,u,n,c3,83,c2,a8,
    (The è character has 4 bytes associated with it)
    Windows Setup:
    Windows Registry: HKEY_LOCAL_MACHINE -> SOFTWARE -> ORACLE -> HOME0 ->
    NLS_LANG=AMERICAN_AMERICA.UTF8
    HTTP headers are set for Content-Type:text/html; charset=UTF-8.
    Anyone know why I would get 2 extra bytes (83,c2) added in the middle of the è character? Is the oracle client doing some other type of character set conversion before I insert it into the database.
    I have also noticed that when I change the NLS_LANG from AMERICAN_AMERICA.UTF8 to AMERICAN_AMERICA.WE8MSWIN1252 that the 4 byte 'è' character works and the 2 byte character doesn't.

    I reproduced the porblem. Only differnce from yours is that it reproduces regardless the NLS_LANG setting.
    Although I cannot be 100% sure, I think what is happening is that Microsoft ODBC Driver Manager converts the insert statement from Windows ACP to Unicode, then calls SQLExecDirectW (WideChar version of SQLExecDirect) of the Oracle ODBC Driver and passes the insert statement in Unicode. Since your PHP code passed the insert statement in UTF-8 encoding, and the Driver Manager converted it from Windows ACP to Unicode, the letter e with grave ("c3,a8" in UTF-8) was wrongly converted to U+00c3, U+00a8 in the Unicode insert statement, then converted to UTF8 ( "c3,83,c2,a8") by Oracle.
    By looking at the PHP source code, apparently PHP odbc_exec() function calls ANSI SQLExecDirect().
    I tried to verify that the Driver Manager calls SQLExecDirectW() of Oracle ODBC Driver by enabling the ODBC Tracing, but I couldn't make it work. It genetates an emply SQL.LOG file. So my investigation stops here.
    IF YOUR METADATA NAMES ARE ASCII ONLY, AND NON-ASCII CHARACTERS APPEAR ONLY IN DATA, you can workaround this problem by binding data. For example,
    $stmt = odbc_prepare($conn, "insert into AME_LINKS (keywords, site_id) values (?, ?)");
    $rs = odbc_execute($stmt, array($invar,77));
    Makoto

  • Help needed regarding insert a record

    Hi,
    I have designed a page to insert employee records.
    After pressing the "Apply" button is giving the following error :
    The requested page contains stale data. This error could have been caused through the use of the browser's navigation buttons (the browser Back button, for example). If the browser's navigation buttons were not used, this error could have been caused by coding mistakes in application code. Please check Supporting the Browser Back Button developer guide - View Object Primary Key Comparison section to review the primary causes of this error and correct the coding mistakes.
    Cause:
    The view object CreateAM.EMP_Create_VO1 contained no record. The displayed records may have been deleted, or the current record for the view object may not have been properly initialized.
    Please help me in resolving this error.
    Thanks,
    Swaroop

    Hi shiv,
    I have created a EO attached it to EMP table. Created VO, atteched to that EO.
    and My controller code is :
    |
    package oracle.apps.OPI.setup.webui;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.webui.OADialogPage;
    import oracle.apps.fnd.framework.webui.TransactionUnitHelper;
    import oracle.apps.fnd.framework.webui.OADialogPage;
    import oracle.apps.fnd.framework.webui.TransactionUnitHelper;
    import oracle.jbo.domain.Number;
    import oracle.apps.fnd.common.MessageToken;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
    * Controller for ...
    public class CreateCO extends OAControllerImpl
    public static final String RCS_ID="$Header$";
    public static final boolean RCS_ID_RECORDED =
    VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
    * Layout and page setup logic for a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    // Always call this first.
    super.processRequest(pageContext, webBean);
    // If isBackNavigationFired = false, we're here after a valid navigation
    // (the user selected the Create Empoyee button) and we should proceed
    // normally and initialize a new employee.
    if (!pageContext.isBackNavigationFired(false))
    // We indicate that we are starting the create transaction (this
    // is used to ensure correct Back button behavior).
    TransactionUnitHelper.startTransactionUnit(pageContext, "empCreateTxn");
    // This test ensures that we don't try to create a new employee if
    // we had a JVM failover, or if a recyled application module
    // is activated after passivation. If these things happen, BC4J will
    // be able to find the row that you created so the user can resume
    // work.
    if (!pageContext.isFormSubmission())
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.invokeMethod("createEmployee", null);
    else
    if (!TransactionUnitHelper.isTransactionUnitInProgress(pageContext, "empCreateTxn", true))
    // We got here through some use of the browser "Back" button, so we
    // want to display a stale data error and disallow access to the page.
    // If this were a real application, we would probably display a more
    // context-specific message telling the user she can't use the browser
    // "Back" button and the "Create" page. Instead, we wanted to illustrate
    // how to display the Applications standard NAVIGATION ERROR message.
    OADialogPage dialogPage = new OADialogPage(NAVIGATION_ERROR);
    pageContext.redirectToDialogPage(dialogPage);
    } // end processRequest()
    * Procedure to handle form submissions for form elements in
    * a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("Apply") != null)
    am.invokeMethod("apply");
    pageContext.forwardImmediately("OA.jsp?page=/oracle/apps/OPI/setup/webui/DisplayPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    else if (pageContext.getParameter("Cancel") != null)
    am.invokeMethod("rollbackEmployee");
    pageContext.forwardImmediately("OA.jsp?page=/oracle/apps/OPI/setup/webui/CreatePG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    My AM code is:
    package oracle.apps.OPI.setup.server;
    import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
    import oracle.jbo.Row;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.jbo.Transaction;
    // --- File generated by Oracle ADF Business Components Design Time.
    // --- Custom code may be added to this class.
    // --- Warning: Do not modify method signatures of generated methods.
    public class CreateAMImpl extends OAApplicationModuleImpl {
    /**This is the default constructor (do not remove)
    public CreateAMImpl() {
    /**Container's getter for CreateVO1
    public CreateVOImpl getCreateVO1() {
    return (CreateVOImpl)findViewObject("CreateVO1");
    /**Sample exportable method.
    public void sampleCreateAMImplExportable() {
    /**Sample exportable method.
    public void sampleCreateAMImplExportable2(String testParam1) {
    /**Sample main for debugging Business Components code using the tester.
    public static void main(String[] args) {
    launchTester("oracle.apps.OPI.setup.server", /* package name */
    "CreateAMLocal" /* Configuration Name */);
    * Creates a new employee.
    public void createEmployee()
    OAViewObject vo = (OAViewObject) getEMP_Create_VO1();
    if (!vo.isPreparedForExecution())
    vo.executeQuery();
    Row row = vo.createRow();
    vo.insertRow(row);
    // Required per OA Framework Model Coding Standard M69
    row.setNewRowState(Row.STATUS_INITIALIZED);
    } // end createEmployee()
    * Executes a rollback including the database and the middle tier.
    public void rollbackEmployee()
    Transaction txn = getTransaction();
    // This small optimization ensures that we don't perform a rollback
    // if we don't have to.
    if (txn.isDirty())
    txn.rollback();
    } // end rollbackEmployee()
    public void apply()
    getDBTransaction().commit();
    /**Container's getter for EMP_Create_VO1
    public EMP_Create_VOImpl getEMP_Create_VO1() {
    return (EMP_Create_VOImpl)findViewObject("EMP_Create_VO1");
    }

  • How to insert text data into temp tables....

    Dear All,
    I have one notepad with three columns, first column is segment1, second column is segment2 & third column is price list....
    and there is no delimiter and exact spaces..(i.e, zizak fomat)
    Ex:-
    xx yy 00009999
    kk mmmm 00009333
    Data is available like above example...So, I need to insert this data into one table.(2LAKSHS OF RECORDS AVAILABLE IN THAT NOTEPAD)
    So, Any can one help me, how to insert this kind of text data into temparory table...
    Regards
    Krishna
    Edited by: user12070109 on May 29, 2010 9:48 PM
    Edited by: user12070109 on May 29, 2010 9:49 PM

    Hello,
    What manu suggested this can be done through oracle forms.
    If as i read your last post you are using that in database it will not work in db. Try to use the same process in oracle forms will work by making some changes.
    And if you don't want to use forms then there is one way using SQL LOADER. It required control file to execute for uploading data.
    See the below link.
    http://www.orafaq.com/wiki/SQL*Loader_FAQ
    In this example its showing filename.csv you can use your file name like yourfilename.txt.
    So your control file will look like this...
    load data
    infile 'file_path\file_name.txt'
    into table table_name  -- use actual table name where you want to upload data
    fields terminated by " "  -- Here using spaces as you mentioned           
    (column1, column2, column3)  -- Here use the three column names of tableAnd after creating control file with the above code. You can call it in command prompt like this
    sqlldr username/password control=control_file_path\control_file_name.ctl log=log_file_path\log_file_name.log
    or
    sqlldr username/password@dbconnection control=control_file_path\control_file_name.ctl log=log_file_path\log_file_name.log
    Before doing this practice make sure SQLLDR.exe availabe in the machine where you have to execute. Otherwise you will have to install db client for using sqlldr.exe
    -Ammad

  • Parsing xml data into oracle database

    Oracle ACEs,
    We got a requirement that needs to load xml data into oracle db. Is it possible to load xml data into oracle db using built-in package. Is Oracle provides one ?
    Our database version is Oracle 9i.
    Your help in this regard is highly appreciated.
    Many Thanks.

    Check this out.
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_xmlsav.htm#1008593

  • CMP to insert CLOB Data in Oracle

    I have a CMP which tries to insert CLOB data into Oracle Database using XMLType column. We have tried multiple options
    1. Inserting String data into XMLType column - if the value is more than 4000 chars, it gives an error
    2. Inserting CLOB Data into XMLType column - Using the OracleCLob option in the deployment descriptor results in a SQLExcepotion Inconsistent datatype expected number found CLOB.
    Can anybody provide a solution to this problem?

    I have a CMP which tries to insert CLOB data into Oracle Database using XMLType column. We have tried multiple options
    1. Inserting String data into XMLType column - if the value is more than 4000 chars, it gives an error
    2. Inserting CLOB Data into XMLType column - Using the OracleCLob option in the deployment descriptor results in a SQLExcepotion Inconsistent datatype expected number found CLOB.
    Can anybody provide a solution to this problem?

  • How to insert data into Oracle db from MySQL db through PHP?

    Hi,
    I want to insert my MySQL data into Oracle database through PHP.
    I can access Mysql database using mysql_conect() & Oracle database using oci_connect() through PHP.
    Now How can I insert my data which is in MySQL into Oracle table. Both table structure are exactly same.
    So I can use
    insert into Oracle_Table(Oracle_columns....) values(Select * from MySQL_Table);
    But again problem is I can't open both connections at the same time.
    So has anyone done this before or anyone having any other idea..
    Plz guide me...

    You can do it if you setup a ODBC Gateway between MYSQL and Oracle DB. Then you can directly read from MySQL table using DB links and insert into Oracle table in one single SQL Statement.
    Otherwise you need to fetch the data from MySQL Into variables in your PHP Program and then insert into Oracle after binding the variables to the insert statement for Oracle. Hope that is clear enough.
    Regards
    Prakash

  • Regarding loading of excel data  into oracle database

    hello,
    Can someone help me in knowing that how can we load excel sheets data into oracle database.
    I will be really thankful to you.
    Gursimran

    Hi,
    There is tool given by oracle "Oracle Bulk Loader "
    you can use this.
    But in order use this you need a control file, which specifies how data should be loaded into the database; and a data file, which specifies what data should be loaded.
    Example :- this is the control file which has information how the data is processed.
    LOAD DATA
    INFILE test.dat
    INTO TABLE test
    FIELDS TERMINATED BY '|'
    (i, s)
    Example :- test.dat which is the data file or say your excel sheet or document
    (1, 'foo')
    (2, 'bar')
    (3, ' baz')
    example of Loading :-
    sqlldr <yourName> control=<ctlFile> log=<logFile> bad=<badFile>
    sqlldr testing control=test.ctl log=test.log
    Thanks
    Pavan Kumar N

Maybe you are looking for

  • MacBook Pro Stuck in Recovery Loop; Disk Utility Error

    I am getting the error: Disk Utility Stopped Repairing "disk0s2" - says disk utility can't repair the disk and I will need to reformat the disk and restore my files. This appears to be the startup disk (could be wrong) - as I am currently in recovery

  • Issue with loop in table control

    Hello experts, I have 20 entries in my table control  but the loop is going through only for 10 entries..please help me? Thanks

  • Problem loading .orf files into photoshop

    I have CC on both an iMac and a MacBook Pro .orf files will load into photoshop on the iMac but not on the MacBook Pro.  A popup appears which states need to update for latest RAW files.  I have run and installed the latest update but without success

  • Merge 2 company codes

    We have 2 company codes, which we are now planning to merge into 1 company code. Does SAP have a solution to migrate all the open line items and trial balance instead of doing it manually

  • [b]Query only responsibility in AR.....[[/b]b]VERY URGENT[/b]

    Hello all, I need to Create a new responsibility in Oracle accounts Receviables which has access to only certains screens for Query_only purpose. The data in those screens should not be modified, deleted, inserted etc it should be for view only purpo