Adding a db record using Statement

Hi,
I'm having trouble adding a record into a database. I keep getting the following error:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at clsDatabase.runQuery(clsDatabase.java:90)
        at frmAppointmentAdd.btnAddActionPerformed(frmAppointmentAdd.java:177)
        at frmAppointmentAdd.access$100(frmAppointmentAdd.java:12)
        at frmAppointmentAdd$2.actionPerformed(frmAppointmentAdd.java:75)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
        at java.awt.Component.processMouseEvent(Component.java:5501)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
        at java.awt.Component.processEvent(Component.java:5266)
        at java.awt.Container.processEvent(Container.java:1966)
        at java.awt.Component.dispatchEventImpl(Component.java:3968)
        at java.awt.Container.dispatchEventImpl(Container.java:2024)
        at java.awt.Component.dispatchEvent(Component.java:3803)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
        at java.awt.Container.dispatchEventImpl(Container.java:2010)
        at java.awt.Window.dispatchEventImpl(Window.java:1778)
        at java.awt.Component.dispatchEvent(Component.java:3803)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)...and here's my code. The variable criteria is set to "INSERT INTO Appointment VALUES '00-005','Test Inc.','000-0004','04/15/2006','4:00 PM'"
Any ideas?
int changed;
changed = statement.executeUpdate(criteria);

Any ideas?You have a null variable and the error message tells you the line:
at clsDatabase.runQuery(clsDatabase.java:90)
So look at all the variables referenced on that line and fix the problem.
You use System.out.println(...) to display the variable and one of them will say "null".

Similar Messages

  • Derivation of juristriction code using state in customer master record

    Hi All
    Is there any way to derive juristriction code using state field in the customer master record without writing abap code.
    For exmple:
    If state of cutomer is NY then juristriction code should be defaulted as NY000000
    Thanks in advance

    Hi,
    It appears by your question, like there is one to one relationship between the state and the jurisdiction code. I am curious to know if you can create a CATT or LSMW program for customer master general data (KNA1) and just fill in state and jurisdiction code (fill in the values in excel) and then upload. You can easily apply an IF condition in excel for if state = NY then jurisdiction is xxxx. You may need one create program and one edit program. This is an easy solution rather than trying to automatically derive in SAP.
    Regards
    Sharabh

  • Using States and the includeIn-property for UI-elements inside my mxml-composide-component

    Hi,
    unfortunatly I am looking for a way to use States in a mxml-component. I’m working with the flash builder 4.6 (means as3).
    Because this did not work when I did use the normal mxml tags for the states inside my VGroup-composite-component, I added a creationComplete-Handler in the Script part of my component in which I instanciated the states and the states-Array via as3. I copied
    this of an internet- article from 2006 that was already dealing with
    as3, but at that time the States were part of the mx-namespace. How ever when I wrote: newState1: State= new State(); my development environment did not know the class State. Did I forgot to import anything or to use a namespace in my Script block ? I imported the AS3 Finite State Machine from meekgeek.com.
    But these states have no name-property insted they got a key-property, but this did not work either though I imported correct and did use the correct namespace. I did not find any State-class-description at Adobe's doku either. All I’m trying to do is to use the standard State-includeIn-properties of UI-Components inside
    my mxml-composide-componend. I’d be much obliged if You may help me in this point.
    Best regards,
    Timan Bracht

    Thanks for the answers so far.
    I can show now the correct KmLimit on the field, thanks to a javabean method, so this problem is solved - even I don't know why on hell it does not show it automatically, since I did give to it literal/expression default value in the attribute properties of the transient field; but never mind.
    The current problem: we use a task flow, that shows an input form to enter new records. This form has a LOV, from where I get a value from, which will be then saved once the submit button has been pressed.
    So far, so good.
    I enter some values in the input fields. If now I save the record, it will be saved, and all the form fields reset to null. Perfect.
    But. If I don't press the save button, instead I pick another value from the LOV list, the values of the input fields does not reset to null, instead, they remain with the last entered value.
    It does not seem there's more to change in the task flow properties that would reset the fields automatically.
    So we're stuck with this issue, the fields remain filled, even if I do set it to null. The value is really null - I set it to null with fieldName.setValue(null) and show it in the console with fieldName.getValue() - but the form still shows the old value in the field.
    Any help is greatly appreciated,
    Sergio.

  • How to update bulk no of records using  Batch Update

    i am trying to insert and update records into multiple tables using Statement addBatch() and executeBatch() method. But some times it is not executing properly. some tables records are inserting and some tables it is not inserting. But I want all the records need to excute and commit or if any error is there then all records need to rollback.
    This is the code i am using.
    public String addBatchQueryWithDB(StringBuffer quries, Connection conNew,Statement stmtNew) throws Exception {
    String success="0";
    try {         
    conNew.setAutoCommit(false);
    String[] splitquery=quries.toString().trim().replace("||","##").split("\\|");
    for(int i=0;i<splitquery.length;i++) {
    //System.out.println("query.."+i+".."+splitquery.trim().replace("##","||"));
    stmtNew.addBatch(splitquery[i].trim().replace("##","||"));
    int[] updCnt = stmtNew.executeBatch();
    for(int k=0;k<updCnt.length;k++){
    int test=updCnt[k];
    if(test>=0){
    success=String.valueOf(Integer.parseInt(success)+1);
    // System.out.println(".updCnt..."+updCnt[k]);
    System.out.println("success...length.."+success);
    if(updCnt.length==Integer.parseInt(success)){
    success="1";
    //conNew.commit();
    } catch (BatchUpdateException be) {
    //handle batch update exception
    int[] counts = be.getUpdateCounts();
    for (int i=0; i<counts.length; i++) {
    System.out.println("DB::addBatchQuery:Statement["+i+"] :"+counts[i]);
    success="0";
    conNew.rollback();
    throw new Exception(be.getMessage());
    } catch (SQLException ee) {
    success="0";
    System.out.println("DB::addBatchQuery:SQLExc:"+ee);
    conNew.rollback();
    throw new Exception(ee.getMessage());
    } catch (Exception ee) {
    success="0";
    System.out.println("DB::addBatchQuery:Exc:"+ee);
    conNew.rollback();
    throw new Exception(ee.getMessage());
    }finally {
    // determine operation result
    if(success!=null && success.equalsIgnoreCase("1")){
    System.out.println("commiting......");
    conNew.commit();
    }else{
    System.out.println("rolling back......");
    success="0";
    conNew.rollback();
    conNew.setAutoCommit(true);
    return success;
    }

    Koteshwar wrote:
    Thank you for ur reply,
    I am using single connection only, but different schemas. Then I am passing a Stringbuffer to a method, and First iam setting con.setAutoCommit(false); and then in that method i am splitting my queries in stringbuffer and adding it to stmt.addBatch(). After that I am executing the batch.after executing the batch i am commiting the connectionIf I am reading that right then you should stop using Batch.
    The intent of Batch is that you have one statement and you are going to be using it over and over again with different data.

  • How to create a new record using a custom method?

    Hi I want to create Jdev 11 a new record using the contructor following in the footsteps of http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state/content/navId.4/navSetId._/vtAnchor.CACCIJAG/vtTopicFile.adfdevguide%7Cweb_adv~htm/.
    My problem is the following.
    Messages for this page are listed below.
    Error
    JBO-29000: Unexpected exception caught: javax.ejb.EJBException, msg=java.lang.IllegalArgumentException: Object: null is not a known entity type.; nested exception is: java.lang.IllegalArgumentException: Object: null is not a known entity type.
    Error
    java.lang.IllegalArgumentException: Object: null is not a known entity type.; nested exception is: java.lang.IllegalArgumentException: Object: null is not a known entity type.
    Error
    Object: null is not a known entity type.
    Someone can help me?
    Cristian.

    Hello Frank, this tutorial make it and was successful but, what I am trying to do is add a new record in the table departments. The steps undertaken are suguientes
    drag over page the contructor department, with a submit, this will drag on the button, the method presistencia, set binding action with "$ (bindings.Departments.result)", and when running the application gives me the error
    Nov 2, 2007 10:06:22 PM oracle.adf.controller.faces.lifecycle.FacesPageLifecycle addMessage
    WARNING: ADFc: JBO-29000: Unexpected exception caught: javax.ejb.EJBException, msg=java.lang.IllegalArgumentException: Object: null is not a known entity type.; nested exception is: java.lang.IllegalArgumentException: Object: null is not a known entity type.
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: javax.ejb.EJBException, msg=java.lang.IllegalArgumentException: Object: null is not a known entity type.; nested exception is: java.lang.IllegalArgumentException: Object: null is not a known entity type.
    I need to know if what I am doing is right, because I followed the steps of the tutorials and it is not functioning the insertion of a new record.
    Thank you thank you.

  • How to insert the records using sql query

    hi,
    i insert the record uisng sql query and DOTNET programme successfully and increase the doc num .ubut when i try to  add record using SAP B1 the old Doc no show.It means its not consider the docnums which are not inserted by sql query.
    how can i solve this problem?
    Regards,
    M.Thippa Reddy

    You are not support use Insert / Update / Delete on SAP Databases directly.
    SAP will not support any database, which is inconsistent, due to SQL-Queries, which modify datasets or the datastructure of the SAP Business One Database. This includes any update-, delete- or drop-statements executed via SQL-Server Tools or via the the query interface of SAP Business One
    Check SAP Note: 896891 Support Scope for SAP Business One - DB Integrity
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=896891]

  • Is it possible to exclude white space from creating records using UNPIVOT

    SELECT
            FROM
                Table1
                UNPIVOT EXCLUDE NULLS
                    NEW_COLUMN
                    FOR COLUMN_NAME IN
                       FIELD1, field2, --------------FIELD20
                )I don't want to create row for whitespace (empty value) in any of field1-field20 columns. Row should create for each of value present in any of FIELD1-FIELD20. Is it possible to exclude white space from creating records using UNPIVOT? I am just looking for syntax if there any. thanks

    Hi,
    Sorry, it's very unclear what you want.
    Whenever you have a question, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}
    Have you tried the the UNPIVOT EXCLUDE NULLS option? See the SQL Language manual for details.
    It that doesn't do what you want, then you may need to UNPIVOT in a sub-query, generating more rows than you want, and use a WHERE clause in the main query to remove the unwanted rows.

  • Updating a record using pay element using the API (Almost Done)

    Hi Everyone,
    I have a question about updating a record using the PAY_ELEMENT_ENTRY_API.update_element_entry
    I have process that doesn't error out, but its doesn't seem to update the record. So my question is, is the query below the correct way to get the element name and object version number when using this API? If not, what do I need to do?
    BEGIN
    SELECT MAX(pee.element_entry_id)
    INTO x_element_id_mgr
    FROM pay_element_types_f pet,
    pay_element_links_f pel,
    pay_element_entries_f pee,
    per_all_assignments_f paaf,
    per_all_people_f papf
    WHERE pee.element_link_id = pel.element_link_id
    AND pel.element_type_id = pet.element_type_id
    AND paaf.assignment_id = pee.assignment_id
    AND papf.person_id = paaf.person_id
    AND pet.element_name = 'Mgr Rec Pct'
    AND sysdate BETWEEN pee.effective_start_date AND pee.effective_end_date
    AND sysdate BETWEEN pel.effective_start_date AND pel.effective_end_date
    AND sysdate BETWEEN pet.effective_start_date AND pet.effective_end_date
    AND sysdate BETWEEN paaf.effective_start_date AND paaf.effective_end_date
    AND sysdate BETWEEN papf.effective_start_date AND papf.effective_end_date
    AND paaf.assignment_id = c_staging.assignment_id
    AND papf.person_id = c_staging.person_id;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    --ROLLBACK TO s1;
    v_error_message := 'For employee number '||c_staging.employee_number||' No data found for element name Mgr Rec Pct' || SUBSTR(sqlerrm, 1, 200);
    DBMS_OUTPUT.PUT_LINE('Error occurred : ' || v_error_message);
    WHEN OTHERS THEN
    --ROLLBACK TO s1;
    v_error_message := 'For employee number '||c_staging.employee_number||' Error found for element name Mgr Rec Pct' || SUBSTR(sqlerrm, 1, 200);
    DBMS_OUTPUT.PUT_LINE('Error occurred : ' || v_error_message);
    END;
    --- Get OVN
    BEGIN
    SELECT MAX(Object_version_number)
    INTO x_ele_object_version_number
    FROM pay_element_entries_f
    WHERE element_entry_id = x_element_id_mgr;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    v_error_message := 'For employee number '||c_staging.employee_number||' Error in getting the OVN for Mgr Rec Pct ' || SUBSTR(sqlerrm, 1, 200);
    DBMS_OUTPUT.PUT_LINE('Error occurred : ' || v_error_message);
    WHEN OTHERS THEN
    v_error_message := 'For employee number '||c_staging.employee_number||' Error in getting the OVN for Mgr Rec Pct' || SUBSTR(sqlerrm, 1, 200);
    DBMS_OUTPUT.PUT_LINE('Error occurred : ' || v_error_message);
    END;

    Your SQL isn't bad, although you're including loads of tables you don't need to so it's probably not as fast as it could be. I'm not sure you know what element entry to update so let's look at an example:
    -- | Element Entry Id | OVN | Start Date | End Date    | Pay Value |
    -- +------------------+-----+------------+-------------+-----------+
    -- | 123                2    1-Jan-2009   31-Jan-2011   USD 400
    -- | 123                1    1-Feb-2009   18-Jun-2011   USD 500
    -- | 123                1    19-Jun-2011  25-Jun-2011   USD 600
    -- | 123                5    26-Jun-2011  31-Dec-4712   USD 700Here the one element entry (Id 123) has 4 effective rows. The employee gets $400 in Jan 2009, $500 from Feb 2009 to mid-June 2011, $600 for a few days later in June 2011 and then $700 from 26th June 2011 onwards.
    So your question to the forum is which one do I update. Well, that depends which one you want to update. If you want to update the 1st Jan 2009 to 31st Jan 2011 you'd pass element_entry_id => 123, ovn => 2, effective_date => to_date('1-Jan-2009', 'DD-MON-YYYY') and datetrack_mode => 'CORRECTION'.
    If you wanted to update the $700 row you'd pass OVN 5 and an effective date of 26th June 2011. And so-on.
    Now in your SQL you're filtering based on sysdate, which means you'd be updating the $500 row (ovn=1). Is that what you want?
    I have simplified your SQL as follows:
    SELECT pee.element_entry_id
          ,pee.object_version_number
    INTO   x_element_id_mgr
          ,x_ele_object_version_number
    FROM   pay_element_entries_f pee
          ,pay_element_types_f pet
    WHERE  pee.assignment_id = c_staging.assignment_id
    AND    pee.element_type_id = pet.element_type_id
    AND    pet.element_name = 'Mgr Rec Pct'
    AND    trunc(sysdate) BETWEEN
           pee.effective_start_date AND pee.effective_end_date
    AND    trunc(sysdate) BETWEEN
           pet.effective_start_date AND pet.effective_end_date;This selects both the entry Id and OVN in one go; there's no need to have 2 SQL statements. If multiple entries are allowed, this SQL could return more than one row so just watch out for that. If you don't want the row as of sysdate change the two sysdate joins accordingly.
    I hope that helps.

  • Editing a record using Objects SAP2007a

    Hi
    I  wrote a program using SAP objects to store contact information for one of our customers.
    I created a SAP object which handled the master table and 2 transactions tables
    There was very little code in the program but the screens are quite complicated
    The user has been adding and editing records for some years now with no problem
    Recently though a user must have changed the contact number ( code field ) of an existing record and they lost the information in the 2 child tables
    When I looked in the tables the code field in the main table had changed but not the code fields in the transaction tables
    Should I test for this in code or is there some automatic way for the code field to be changed in the transaction tables ?
    Any ideas please ?
    Regards Andy

    Hi Andy,
    I doubt both your thoughts, code either being changed automatically or thru code.  If the same code has been working all these years, and if the user has done a similar operation earlier, there is no chance of problem being in the code.
    If such an operation performed by the user is for the first time, then, there might be a doubt in the way things are handled in the code. 
    My sincere advice is, you might check with the user himself as to what exactly was done during the update of the contact info.  If they had tried to change any other value, like say code or something due to a typo perhaps, and if that is not handled by your code, then, chances are there for this scenario of yours.
    Regards,
    Satish.

  • How to Dynamically Display Different ViewStack component without using State?

    I have a type column in a datagrid record, when type = A, I want to display ViewStack A, when type = B, I want to display ViewStack B, any body can give me some clues? sample code is best. Thanks a lot. BTW, I don't want to use state to control them, as both ViewStacks are already within the same application state.

    hi,
    you can try something like this.....
    David.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.events.ListEvent;
    [Bindable] private var arr:ArrayCollection = new ArrayCollection([
    {info:"record 1", type:"A"},
    {info:"record 2", type:"B"},
    {info:"record 3", type:"A"},
    {info:"record 4", type:"B"}
    protected function dg_changeHandler(event:ListEvent):void
    if (arr[dg.selectedIndex].type=="A") tn1.visible = true else tn1.visible = false;
    tn2.visible = !tn1.visible;
    ]]>
    </mx:Script>
    <mx:DataGrid id="dg" x="279" y="239" dataProvider="{arr}" change="dg_changeHandler(event)">
    <mx:columns>
    <mx:DataGridColumn headerText="Info" dataField="info"/>
    <mx:DataGridColumn headerText="Type" dataField="type"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:TabNavigator x="279" y="408" width="200" height="200" id="tn1">
    <mx:Canvas label="Tab 1" width="100%" height="100%">
    </mx:Canvas>
    </mx:TabNavigator>
    <mx:TabNavigator x="507" y="408" width="200" height="200" id="tn2">
    <mx:Canvas label="Tab 1" width="100%" height="100%">
    </mx:Canvas>
    </mx:TabNavigator>
    </mx:Application>

  • Deletion HR - Infotype records using BAPI

    Hi experts,
    I sucessfully added infotype crecords in HR-ABAP using function module HR_INFOTYPE_OPERATION.   For deleting the same record using the same function module (operation = 'DEL'), i got error message as <b>009No data stored for 0008 in the selected period</b>.  What is the problem...?
    Can any one pls solve it.
    <b><REMOVED BY MODERATOR></b>
    Thank u.
    Regards,
    Murugan Arumugam
    Message was edited by:
            Alvaro Tejada Galindo

    HI Murugan,
            Following is the sample code for deletion of a record using the FM...'HR_INFOTYPE_OPERATION'
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
           EXPORTING
               INFTY            = '4002'
               NUMBER           = RECORD_4002-PERNR
               SUBTYPE          = RECORD_4002-SUBTY
               OBJECTID         = RECORD_4002-OBJPS
               LOCKINDICATOR    = RECORD_4002-SPRPS
               VALIDITYEND      = WENDDA
               VALIDITYBEGIN    = WBEGDA
               RECORDNUMBER     = RECORD_4002-SEQNR
               RECORD           = RECORD_4002
               OPERATION        = 'DEL'
               TCLAS            = 'B'
               DIALOG_MODE      = '0'
          IMPORTING
               RETURN           = RETLIST.
    Regards,
    Ranganathan.

  • Inserting record using form does not work. Please Help

    I am trying to insert a record using INSERT INTO command in a form followed by commit.
    I put the command in when-button-press trigger( I use a button to initiate insert into table command).
    But it does insert the record into the table.
    Then I try to ignore the INSERT INTO command and only use COMMIT, and it works.
    But when I use control block, I can not use commit only to insert into table.
    Is there anything that I have missed ?
    PLease help. I had tried to solve this fora week.
    Thank you, I really appreciate any response.

    Setting your block as a datablock with source as a specified table and a number of items connected to specified columns gives you direct access to your table. Thus your commit alone will work. The second you change this to a control block, you cut your connection to the table. Thus you must use an insert into statement followed by a commit. By the way, when you use a commit statement, it processes exactly like a commit_form inbuilt function.
    Hope this helps,
    Dave

  • Need to update multiple records using store procedure

    Hi i am trying to update multiple records using store procedure but failed to achieve pls help me with this
    for example my source is
    emp_name sal
    abhi 2000
    arti 1500
    priya 1700
    i want to increase salary of emp whose salary is less than 2000 it means rest two salary should get update..using stored procedure only
    i have tried following code
    create or replace procedure upt_sal(p_sal out emp.sal%type, p_cursor out sys_refcursor)
    is
    begin
    open p_cursor for
    select sal into p_sal from emp;
    if sal<2000 then
    update emp set sal= sal+200;
    end i;f
    end;
    and i have called the procedure using following codes
    set serveroutput on
    declare
    p_sal emp.sal%type;
    v_cursor sys_refcursor;
    begin
    upt_sal(p_sal,v_cursor);
    fetch v_cursor into p_sal;
    dbms_output.put_line(p_sal);
    end;
    the program is executing but i should get o/p like this after updating
    1700
    1900
    but i am getting first row only
    2000
    and record is not upsating...please help me with this
    thanks

    Hi Alberto,
    thanx for your valuable suggestion. but still i have doubt. the code which i have mentioned above might be simple but what if i have big requirement where i need update the data by using loops and conditional statement.
    and i have similar kind of requirement where i need to deal with procedure which returns more than one row
    my source is
    empno ename salary
    111,abhi,300
    112,arti,200
    111,naveen,600
    here i need to write a store procedure which accepts the empno (111) as input para and display ename and salary
    here i have written store procedure like this
    create or replace procedure show_emp_det(p_empno in emp.empno%type, p_ename out emp.ename%type,p_salary out emp.salary%type, p_cursor out sys_refcursor)
    is
    begin
    open p_cursor for
    select ename,salary into p_ename,p_salary from emp where empno=p_empno;
    end;
    and i have called this by using
    declare
    p_salary emp.salary%type;
    p_ename emp.ename%type
    v_cursor sys_refcursor;
    begin
    show_emp_det(111,p_ename,p_salary,v_cursor);
    fetch v_cursor into p_ename,p_salary;
    dbms_output.put_line(p_ename);
    dbms_output.put_line(p_salary);
    end;
    here i should get
    abhi,300
    naveen,600
    but i am getting first row only
    abhi,300
    but i want to fetch both rows...pls help me to find the solution

  • Insert record using stored procedure

    Dear all,
    I want to insert record using stored procedure in form6i,
    any help or suggestion will be appreciated.
    regards
    Kashif Ali

    Kashif,
    Could you please explain what you are trying to accomplish? Inserting records into a table from Forms is as simple as executing an INSERT statement in a Forms trigger or as complicated as overriding the Forms default INSERT functionality by defining your own On-Insert trigger. Your requirements will dictate where and how you do your INSERT.
    Craig...

  • How can i inserts record using procedure in adf

    how can i insert record using procedure
    hi i have the following i what to insert record using store procedure, i try this
    am in JDeveloper Studio 11.1.2.1.0
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="SmsPartyAddressView"
      Version="11.1.2.60.81"
      BindingStyle="OracleName"
      CustomQuery="true"
      PageIterMode="Full"
      UseGlueCode="false"
      RowClass="sms1100.SmsPartyAddressViewRowImpl"
      ComponentClass="sms1100.SmsPartyAddressViewImpl"
      DefClass="sms1100.SmsPartyAddressViewDefImpl"
      RowInterface="sms1100.common.SmsPartyAddressViewRow"
      ClientRowProxyName="sms1100.client.SmsPartyAddressViewRowClient">
      <DesignTime>
        <Attr Name="_isExpertMode" Value="true"/>
        <Attr Name="_codeGenFlag2" Value="Access|Def|Coll|Prog|VarAccess"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <Properties>
        <SchemaBasedProperties>
          <LABEL
            ResId="sms1100.SmsPartyAddressView_LABEL"/>
        </SchemaBasedProperties>
      </Properties>
      <ViewAccessor
        Name="Sub_lov1"
        ViewObjectName="sms1100.Sub_lov"
        RowLevelBinds="true"/>
      <ListBinding
        Name="LOV_Town"
        ListVOName="Sub_lov1"
        ListRangeSize="-1"
        ComboRowCountHint="10"
        NullValueFlag="none"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="Town"/>
        </AttrArray>
        <AttrArray Name="DerivedAttrNames">
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="TowId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="Id"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="DsdRegion"/>
          <Item Value="ServiceDeliveryArea"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
      <SQLQuery><![CDATA[SELECT
           SmsPartyAddress.ADDRESS_LINE1,
           SmsPartyAddress.ID,
           SmsPartyAddress.ADDRESS_LINE2,
           SmsPartyAddress.ADDRESS_LINE3,
           SmsPartyAddress.ADDRESS_LINE4,
           SmsPartyAddress.ADDRESS_TYPE_IND,
           SmsPartyAddress.PAR_ID,
           SmsPartyAddress.PROP_ID,
           SmsPartyAddress.START_DT,
             SmsProperties.ERF_NO,
           SmsProperties.ADDRESS_LINE,
           SmsProperties.ZONE,
           SmsProperties.GPS_LONGITUDE,
           SmsProperties.GPS_LATITUDE,
           SmsProperties.TOW_ID,
           SmsProperties.WAR_ID,
            DECODE(TOW1.TOWN,NULL,TOW.TOWN,TOW1.TOWN)TOWN ,
           TOW.TOWN SUBURB,
           POSTAL_CODE
    FROM SMS_PARTY_ADDRESS SmsPartyAddress,
         SMS_PROPERTIES SmsProperties,
          SMS_TOWNS TOW
        ,SMS_TOWNS TOW1
        ,SMS_POSTAL_CODES PCOD
          WHERE TOW.PCOD_ID = PCOD.ID
        AND TOW.TOW_ID = TOW1.ID (+)
        --and TOW1.ID = SMSPROPERTIES.TOW_ID(+)
        and TOW.ID = SMSPROPERTIES.TOW_ID
        and SMSPARTYADDRESS.PROP_ID = SMSPROPERTIES.ID
         CONNECT BY PRIOR TOW.TOW_ID = TOW.ID]]></SQLQuery>
      <EntityUsage
        Name="SmsPartyAddress"
        Entity="sms1100.SmsPartyAddress"/>
      <ViewAttribute
        Name="AddressLine1"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE1"
        Expression="ADDRESS_LINE1"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Id"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="java.math.BigInteger"
        ColumnType="NUMBER"
        AliasName="ID"
        Expression="ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="AddressLine2"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE2"
        Expression="ADDRESS_LINE2"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine3"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE3"
        Expression="ADDRESS_LINE3"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine4"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="50"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE4"
        Expression="ADDRESS_LINE4"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="50"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressTypeInd"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="java.math.BigInteger"
        ColumnType="NUMBER"
        AliasName="ADDRESS_TYPE_IND"
        Expression="ADDRESS_TYPE_IND"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="ParId"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="PAR_ID"
        Expression="PAR_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="PropId"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="java.math.BigInteger"
        ColumnType="NUMBER"
        AliasName="PROP_ID"
        Expression="PROP_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="StartDt"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.sql.Timestamp"
        ColumnType="DATE"
        AliasName="START_DT"
        Expression="START_DT"
        SQLType="DATE"/>
      <ViewAttribute
        Name="ErfNo"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="80"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ERF_NO"
        Expression="ERF_NO"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="80"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="120"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE"
        Expression="ADDRESS_LINE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="120"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Zone"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="20"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ZONE"
        Expression="ZONE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="20"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="GpsLongitude"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="40"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="GPS_LONGITUDE"
        Expression="GPS_LONGITUDE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="40"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="GpsLatitude"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="40"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="GPS_LATITUDE"
        Expression="GPS_LATITUDE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="40"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="TowId"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="java.math.BigInteger"
        ColumnType="NUMBER"
        AliasName="TOW_ID"
        Expression="TOW_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="WarId"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.lang.Integer"
        ColumnType="NUMBER"
        AliasName="WAR_ID"
        Expression="WAR_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="Town"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="TOWN"
        Expression="TOWN"
        SQLType="VARCHAR"
        LOVName="LOV_Town">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
        <Properties>
          <SchemaBasedProperties>
            <CONTROLTYPE
              Value="combo_lov"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
      <ViewAttribute
        Name="Suburb"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="SUBURB"
        Expression="SUBURB"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="PostalCode"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="4"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="POSTAL_CODE"
        Expression="POSTAL_CODE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="4"/>
        </DesignTime>
      </ViewAttribute>
      <ResourceBundle>
        <PropertiesBundle
          PropertiesFile="SmsFrontService.SmsFrontServiceBundle"/>
      </ResourceBundle>
    </ViewObject>my calling method is
    public class SmsPartyAddressViewRowImpl extends ViewRowImpl implements SmsPartyAddressViewRow {
        protected void callNewProperty(String stmt, Object[] bindVars) {
                   PreparedStatement st;
                   st = null;
                   try {
                       // 1. Create a JDBC PreparedStatement for
                       st = getDBTransaction().createPreparedStatement("begin " + stmt + ";end;", 0);
                       if (bindVars != null) {
                           // 2. Loop over values for the bind variables passed in, if any
                           for (int z = 0; z < bindVars.length; z++) {
                               // 3. Set the value of each bind variable in the statement
                               st.setObject(z + 1, bindVars[z]);
                       // 4. Execute the statement
                       st.executeUpdate();
                   } catch (SQLException e) {
                       throw new JboException(e);
                   } finally {
                       if (st != null) {
                           try {
                               // 5. Close the statement
                             st.close();
                           } catch (SQLException e) {
        protected void callInsertProcedure(TransactionEvent e) {
           // String Addressline = null;
            String Zone = "UNDERF";
            Date StartDt = null;
           // EntityDefImpl SmsPropertiesDef = SmsPropertiesImpl.getDefinitionObject();
           // SmsPropertiesImpl newSmsProperties = (SmsPropertiesImpl)SmsPropertiesDef.createInstance2(getDBTransaction(), null);
        callNewProperty("Sms_Location.newProp(?,?,?,?,?,?,?,?,?,?,?,?)",
        new Object[] { getParId(), getAddressTypeInd(), getAddressLine1(),
        getAddressLine2(), getAddressLine3(), getAddressLine4(),getAddressLine(),getSuburb(),getTown(),getPostalCode(),getTowId(),Zone,StartDt });
    Edited by: ADF007 on 2012/08/13 6:59 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    that solution was based on the hr schema now am inserting using my schema
    inserting record in a view using procedure
    hi i have the folowing view, i what to insert record using procedure,this is what i what ,i what to insert record using the view but pass those view variable to procedure. my view is
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="smsproppartyview"
      Version="11.1.2.60.81"
      BindingStyle="OracleName"
      CustomQuery="true"
      PageIterMode="Full"
      UseGlueCode="false"
      RowClass="sms1100.smsproppartyviewRowImpl"
      ComponentClass="sms1100.smsproppartyviewImpl"
      RowInterface="sms1100.common.smsproppartyviewRow"
      ClientRowProxyName="sms1100.client.smsproppartyviewRowClient">
      <DesignTime>
        <Attr Name="_isExpertMode" Value="true"/>
        <Attr Name="_codeGenFlag2" Value="Access|Coll|Prog|VarAccess"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <Properties>
        <SchemaBasedProperties>
          <LABEL
            ResId="sms1100.smsproppartyview_LABEL"/>
        </SchemaBasedProperties>
      </Properties>
      <ViewAccessor
        Name="Sub_lov1"
        ViewObjectName="sms1100.Sub_lov"
        RowLevelBinds="true"/>
      <ListBinding
        Name="LOV_Town"
        ListVOName="Sub_lov1"
        ListRangeSize="-1"
        ComboRowCountHint="10"
        NullValueFlag="none"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="Town"/>
        </AttrArray>
        <AttrArray Name="DerivedAttrNames">
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="TowId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="Id"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="DsdRegion"/>
          <Item Value="ServiceDeliveryArea"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
      <SQLQuery><![CDATA[SELECT
           SmsPartyAddress.ID,
           SmsPartyAddress.ADDRESS_LINE2,
           SmsPartyAddress.ADDRESS_LINE3,
           SmsPartyAddress.ADDRESS_LINE4,
           SmsPartyAddress.ADDRESS_LINE1,
            SmsProperties.ADDRESS_LINE,     
            DECODE(TOW1.TOWN,NULL,TOW.TOWN,TOW1.TOWN)TOWN ,
           TOW.TOWN SUBURB,
           POSTAL_CODE,
            SmsPartyAddress.PAR_ID,
           SmsPartyAddress.PROP_ID,
            SmsProperties.ID AS ID1,
           SmsPartyAddress.ADDRESS_TYPE_IND,      
           SmsPartyAddress.START_DT,
           SmsProperties.TOW_ID,
           SmsProperties.ERF_NO,
           SmsProperties.WAR_ID,
           SmsProperties.ZONE
    FROM SMS_PARTY_ADDRESS SmsPartyAddress, SMS_PROPERTIES SmsProperties,
    SMS_TOWNS TOW
        ,SMS_TOWNS TOW1
        ,SMS_POSTAL_CODES PCOD
    WHERE SmsPartyAddress.PROP_ID = SmsProperties.ID
    and TOW.PCOD_ID = PCOD.ID
        AND TOW.TOW_ID = TOW1.ID (+)
        --and TOW1.ID = SMSPROPERTIES.TOW_ID(+)
        and TOW.ID = SMSPROPERTIES.TOW_ID
        and SmsPartyAddress.prop_id = SmsProperties.id
         CONNECT BY PRIOR TOW.TOW_ID = TOW.ID]]></SQLQuery>
      <ViewAttribute
        Name="Id"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="ID"
        SQLType="NUMERIC">
        <RecalcCondition><![CDATA[true]]></RecalcCondition>
        <TransientExpression><![CDATA[(new oracle.jbo.server.SequenceImpl("SMS_MAST1_SEQ",adf.object.getDBTransaction())).getSequenceNumber()]]></TransientExpression>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine2"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE2"
        Expression="ADDRESS_LINE2"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine3"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE3"
        Expression="ADDRESS_LINE3"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine4"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="50"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE4"
        Expression="ADDRESS_LINE4"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="50"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine1"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="100"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE1"
        Expression="ADDRESS_LINE1"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="100"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressLine"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="120"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ADDRESS_LINE"
        Expression="ADDRESS_LINE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="120"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Town"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="TOWN"
        Expression="TOWN"
        SQLType="VARCHAR"
        LOVName="LOV_Town">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
        <Properties>
          <SchemaBasedProperties>
            <CONTROLTYPE
              Value="combo_lov"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
      <ViewAttribute
        Name="Suburb"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="SUBURB"
        Expression="SUBURB"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="PostalCode"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="4"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="POSTAL_CODE"
        Expression="POSTAL_CODE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="4"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="ParId"
        IsPersistent="false"
        PrecisionRule="true"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="PAR_ID"
        Expression="PAR_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="PropId"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="PROP_ID"
        Expression="PROP_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="Id1"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="ID1"
        SQLType="NUMERIC">
        <RecalcCondition><![CDATA[true]]></RecalcCondition>
        <TransientExpression><![CDATA[(new oracle.jbo.server.SequenceImpl("SMS_MAST1_SEQ",adf.object.getDBTransaction())).getSequenceNumber()]]></TransientExpression>
      </ViewAttribute>
      <ViewAttribute
        Name="AddressTypeInd"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="ADDRESS_TYPE_IND"
        Expression="ADDRESS_TYPE_IND"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="StartDt"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.sql.Timestamp"
        ColumnType="DATE"
        AliasName="START_DT"
        SQLType="DATE">
        <RecalcCondition><![CDATA[true]]></RecalcCondition>
        <TransientExpression><![CDATA[adf.currentDate]]></TransientExpression>
      </ViewAttribute>
      <ViewAttribute
        Name="TowId"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="38"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="TOW_ID"
        Expression="TOW_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="ErfNo"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="80"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ERF_NO"
        Expression="ERF_NO"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="80"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="WarId"
        IsPersistent="false"
        PrecisionRule="true"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="WAR_ID"
        Expression="WAR_ID"
        SQLType="NUMERIC"/>
      <ViewAttribute
        Name="Zone"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="20"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="ZONE"
        Expression="ZONE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="20"/>
        </DesignTime>
      </ViewAttribute>
      <ResourceBundle>
        <PropertiesBundle
          PropertiesFile="SmsFrontService.SmsFrontServiceBundle"/>
      </ResourceBundle>
    </ViewObject>this is what i have try
    public class smsproppartyviewImpl extends ViewObjectImpl {
        protected void callNewProperty(String stmt, Object[] bindVars) {
                   PreparedStatement st;
                   st = null;
                   try {
                       // 1. Create a JDBC PreparedStatement for
                       st = getDBTransaction().createPreparedStatement("begin " + stmt + ";end;", 0);
                       if (bindVars != null) {
                           // 2. Loop over values for the bind variables passed in, if any
                           for (int z = 0; z < bindVars.length; z++) {
                               // 3. Set the value of each bind variable in the statement
                               st.setObject(z + 1, bindVars[z]);
                       // 4. Execute the statement
                       st.executeUpdate();
                   } catch (SQLException e) {
                       throw new JboException(e);
                   } finally {
                       if (st != null) {
                           try {
                               // 5. Close the statement
                             st.close();
                           } catch (SQLException e) {
        protected void callInsertProcedure(TransactionEvent e) {
            String Addressline = null;
            String Zone = "UNDERF";
            String Town = null;
            String Suburb = null;
            String PostalCode = null;
            String Addressline1 = null;
            String Addressline2 = null;
            String Addressline3 = null;
            String Addressline4 = null;
            Integer AddressTypeInd = null;
            Integer parid = null;
            //Date StartDt = null;
            Integer towid = null;
            ApplicationModuleHandle handle = null;
                               handle = Configuration.createRootApplicationModuleHandle
                               ("sms1100.sms1100Moduleold", "sms1100ModuleShared");
                               ApplicationModule sam = handle.useApplicationModule();
                               sam.processChangeNotifications();
            ViewObject svo = sam.findViewObject("smsproppartyview1");
            svo.executeQuery();
            Row row = svo.first();
            if (svo != null){
                Addressline = (String)row.getAttribute("AddressLine");
                Zone = (String)row.getAttribute("Zone");
                Town = (String)row.getAttribute("Town");
                Suburb = (String)row.getAttribute("Suburb");
                PostalCode = (String)row.getAttribute("PostalCode");
                towid = (Integer)row.getAttribute("TowId");
                Addressline1 = (String)row.getAttribute("Addressline1");
                Addressline2 = (String)row.getAttribute("Addressline2");
                Addressline3 = (String)row.getAttribute("Addressline3");
                Addressline4 = (String)row.getAttribute("Addressline4");
                AddressTypeInd = (Integer)row.getAttribute("AddressTypeInd");
                parid = (Integer)row.getAttribute("ParId");
            //EntityDefImpl SmsPropertiesDef = SmsPropertiesImpl.getDefinitionObject();
            //SmsPropertiesImpl newSmsProperties = (SmsPropertiesImpl)SmsPropertiesDef.createInstance2(getDBTransaction(), null);
            //newSmsProperties.setAddressLine(Addressline);
            //newSmsProperties.setTowId(towid);
        callNewProperty("Sms_Location.newProp(?,?,?,?,?,?,?,?,?,?,?,?)",
        new Object[] { parid, AddressTypeInd, Addressline1,
        Addressline2, Addressline3, Addressline4,Addressline,Town,Suburb,PostalCode,towid,Town,Suburb,PostalCode,towid,Zone });
    }am in Jdeveloper 11.1.2.1.0

Maybe you are looking for