INSERTING DATA urgent

I am using Ms access for data base how do we insert data.
What is the main difference b/w prepared and callable statement.

rajpunia,
how do we insert data.Using an (SQL) INSERT statement. This is a standard SQL operation, so the syntax should be the same for any database (including "MS Access").
What is the main difference b/w prepared and callable statement.I use a "PreparedStatement" for performing INSERT, UPDATE, DELETE and SELECT (SQL) statements.
I use a "CallableStatement" to execute database stored procedures and functions.
(I'm not sure if "MS Access" supports database stored procedures/functions.)
Good Luck,
Avi.

Similar Messages

  • Its very urgent:how to insert data into database tables

    Hi All,
    I am very new to oaf.
    I have one requirement data insert into database tables.
    here createPG having data that data insert into one custom table.
    but i dont know how to insert data into database tables.
    i wrote the code in am,co as follows.
    in am i wrote the code:
    public void NewoperationManagerLogic()
    ManagerCustomTableVOImpl vo1=getManagerCustomTableVO1();
    OADBTransaction oadbt=getOADBTransaction();
    if(!vo1.isPreparedForExecution())
    vo1.executeQuery();
    Row row=vo1.createRow();
    vo1.insertRow(row);
    in createPG processrequest co:
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
    am.NewoperationManagerLogic();
    process form request:
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if(pageContext.getParameter("Submit")!=null)
    ManagerInformationAMImpl am=(ManagerInformationAMImpl)pageContext.getApplicationModule(webBean);
    am.getOADBTransaction().commit();
    please help with an example(sample code).
    its very urgent.
    thanks in advance
    Seshu
    Edited by: its urgent on Dec 25, 2011 9:31 PM

    Hi ,
    1.)You must have to create a EO based on custom table and then VO based on this EO eventually to save the values in DB
    2.) the row.setNewRowState(Row.STATUS_INITIALIZED); is used to set the the status of row as inialized ,this is must required.
    3.) When u will create the VO based on EO the viewattributes will be created in VO which will be assigned to the fields to take care the db handling .
    You must go thtough the lab excercise shipped with you Jdeveloper ,there is a example of Create Employee page ,that will solve your number of doubts.
    Thanks
    Pratap

  • *Urgent*How to insert data from MS SQL to the table that create at the adobe form?

    Hi,
    I'm using Adobe life cycle designer 8 to do my interactive form. I would like to ask how to insert data from MS SQL to the table that i have created in my adobe interactive form?
    I really need the information ASAP as i need to hand in my project by next week... i really appreciate any one who reply this post.
    Thanks

    Tou need to do a couple of things
    1. On the Essbase server, set up an odbc system connection to your MySQL database
    2. In the load rule , go to the file menu and select open SQL data source and in the data source put in your SQL statement . A couple of hints. Where it says Select, don't put in the word select and where it say from don't put in from. The system adds them for you. The easiest way ti enter a SQL statement is to do it all in the select area So if your SQL would normanlly say select * from mytable just enter the code as * from mytable in the select area
    The click ol/retrieve and enter in your connection info. Itshould bring data back into the load rule. Save the load rule and use it

  • URGENT-- inserting data through tables.

    Hi
    I m working on Resume Generator. I have created a Create Resume page. It is working fine, inserting data properly.
    However, there is one problem—
    While creating the resume one employee can have multiple certificates.
    In addition, one employee can have multiple competencies.
    So in the create Résumé page I have taken three regions—
    One for employee details
    Two for certifications
    Three for competencies
    In certificateRN and CompetencyRN, I have added one item each of style table. In addition, separate controllers for each RN.
    Then configured the tables to include “ADD a row” button in both the tables with “Add Competency” and “Add Certificate” label resp.
    the code in AddCompetencyCO is ----
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OATableBean comtable = (OATableBean)webBean.findIndexedChildRecursive("CompetencyTable");
    comtable.clearCache(pageContext);
    comtable.setInsertable(true);
    comtable.setAutoInsertion(false);
    comtable.prepareForRendering(pageContext);
    String combuttonLabel =
    pageContext.getMessage("XX_RESGEN", "XX_T_ADD_COMPETENCY", null);
    OAAddTableRowBean comaddRow = (OAAddTableRowBean)comtable.getColumnFooter();
    comaddRow.setText(combuttonLabel);
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule CreateAM = pageContext.getApplicationModule(webBean);
    if (ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    CreateAM.invokeMethod("AddCompetency", null);
    The Code in AddCertificationCO is--
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OATableBean table = (OATableBean)webBean.findIndexedChildRecursive("CertificationTable");
    table.clearCache(pageContext);
    table.setInsertable(true);
    table.setAutoInsertion(false);
    table.prepareForRendering(pageContext);
    String buttonLabel =
    pageContext.getMessage("XX_RESGEN", "XX_T_ADD_CERTIFICATE", null);
    OAAddTableRowBean addRow = (OAAddTableRowBean)table.getColumnFooter();
    addRow.setText(buttonLabel);
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule CreateAM = pageContext.getApplicationModule(webBean);
    if (OAWebBeanConstants.ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM))) {
    CreateAM.invokeMethod("AddCertificate", null);
    and the code in MainCO is --
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    String actionInCreateResmScreen = pageContext.getParameter(EVENT_PARAM);
    OAApplicationModule CreateAM = pageContext.getApplicationModule(webBean);
    CreateAM.invokeMethod("CreateResumeMethod");
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    String actionInCreateResmScreen = pageContext.getParameter(EVENT_PARAM);
    if (actionInCreateResmScreen.equals("AddProjects"))
    pageContext.setForwardURL(
    "OA.jsp?page=/CGR/oracle/apps/xx_resgen/employee/webui/AddProjectPG"
    ,null
    ,OAWebBeanConstants.KEEP_MENU_CONTEXT
    ,null
    ,null
    ,true
    ,OAWebBeanConstants.ADD_BREAD_CRUMB_NO
    ,OAWebBeanConstants.IGNORE_MESSAGES);
    Now the problem is –
    When I click on “Add Competency” button a row is added in both the tables and not only in Competency Table. i.e. the control is going in the PFR(Process Form Request) of both the controllers. And same is happening with “Add Certificate”. Data is being inserted in all the DBtables properly but this is the problem in design.
    I tried a lot but I m not getting it right. Please help.

    Hi,
    SOURCE_PARAM - indicates the source of the event that is generating the current browser request. This maps to the name attribute of the web bean. If you wish to check whether a table generated an event, you include in your code:
    if (tableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM)))
    To check for the "Add Rows" event:
    if (tableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM)))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    This is explained in Dev guide.
    Hope this helps.
    - Senthil

  • Urgent!!!!!  Inserting data in table control of infotype.

    Hi Experts,
    I want to insert data in custom infotype.I am using FM HR_INFOTYPE_OPERATION for this purpose.But custom infotype contains a table control.
    Table control of infotype has 20 rows containing  fields name01 , addr01 upto name20 , addr20.
    How do i insert data in table control fields of infotype if i want to use FM HR_INFOTYPE_OPERATION .
    Pls suggest if there is another way to do it.
    Thanks.

    Thanks for your reply.
    I am Calling FM HR_INFOTYPE_OPERATION in a loop of a table.
    Table contains multiple employee numbers-PERNR.There can be all different PERNR or some records of same PERNR.
    Suppose if there are four records in the table.First two records are of the same PERNR.Then how would name01 or name02 will be assigned.
    Now, third record is  of new PERNR .Again it should be name01.
    So the question is how everytime in a loop i will assign nameNN for different PERNR.
    nameNN and addrNN was an example. I am sending my code here.
    Loop at it_data.
    gs_9000-PERNR = it_data-pernr..
    gs_9000-currentamount03 = it_data-curramt.
    gs_9000-mtdamount03 = it_data-mtd.
    gs_9000-qtdamount03 = it_data-qtd.
    gs_9000-ytdamount03 = it_data-ytd.
    gs_9000-roll12amount03 = it_data-roll.
    CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
    EXPORTING
    NUMBER = gs_9000-pernr
    IMPORTING
    RETURN = RETURNE.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
    INFTY = '9000'
    NUMBER = gs_9000-PERNR
    VALIDITYBEGIN = '20080801' 
    RECORD = gs_9000
    OPERATION = 'INS'
    TCLAS = 'A'
    DIALOG_MODE = '0'
    IMPORTING
    RETURN = RETURN
    KEY = KEY.
    IF RETURN IS NOT INITIAL.
    WRITE :/ 'Error Occurred'.
    ENDIF.
    CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
    EXPORTING
    NUMBER = gs_9000-PERNR
    endloop.
    So in above code...
    gs_9000-currentamount03 = it_data-curramt.
    gs_9000-mtdamount03 = it_data-mtd.
    gs_9000-qtdamount03 = it_data-qtd.
    gs_9000-ytdamount03 = it_data-ytd.
    gs_9000-roll12amount03 = it_data-roll.
    these are table control fields , so how i wud i assign for
    gs_9000-currentamount04 = it_data-curramt.
    gs_9000-mtdamount04 = it_data-mtd.
    gs_9000-qtdamount04 = it_data-qtd.
    gs_9000-ytdamount04 = it_data-ytd.
    gs_9000-roll12amount04 = it_data-roll.
    in loop of a table.
    Thanks

  • urgent insert Date with Time into Access Database

    i found the following codes from the forum to insert date into microsoft access database:
    java.sql.Date date = new java.sql.Date((new java.util.Date()).getTime())
    stmt.executeUpdate("INSERT INTO Testing " +"VALUES (#"+date+"#)");
    but i need to insert the date together with its time so may i know how can i do it?

    thanks alot i works... but it allow only one value to be inserted.
    so i try the codes below:
    Timestamp ts=new Timestamp(tryDate.getTime());
    PreparedStatement p = connection.prepareStatement("insert into testing values(?,?)");
    p.setTimestamp(1,ts);
    p.setString(2,theMsg.getContent());
    p.executeUpdate();
    and error is this:
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Number of query values and destination fields are not the same.
         at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6106)
         at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6263)
         at sun.jdbc.odbc.JdbcOdbc.SQLExecute(JdbcOdbc.java:2564)
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(JdbcOdbcPreparedStatement.java:214)
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeUpdate(JdbcOdbcPreparedStatement.java:136)
         at DBIncomingQueue.insertMessage(DBIncomingQueue.java:84)
         at DBIncomingQueue.main(DBIncomingQueue.java:213)

  • Can we insert data directly in standard table

    hi
    how can we insert data in standard table directly.
    pls reply urgently.

    Hi sapna yes u can insert data to the SAP tables, as shown below...
    use the table mara in the place of m
    REPORT  ZTEST_INSERT.
    TABLES: <m>.
    DATA: wa_m TYPE <m>.
    wa_m-ernam = 'ZTEST'.
    insert into <m> VALUES wa_m.
    if sy-subrc = 0.
      WRITE / 'Records inserted Successfully'.
    ENDIF.
    reward if usefull,
    Vishnu. R
    Edited by: vishnu ramanathan on Sep 18, 2008 2:17 PM

  • RFC scenario for inserting data in SAP, help me experts

    hi...
    i have to insert data in SAP database using BAPI_PR_CREATE.
    which adapter i hv to use for RFC(sender/receiver)(syn/Asyn).
    this sceanrio is File1-RFC-File2.
    file1 sends the data to RFC to insert data and file2 should hv to send the autogeneration keyID for PR
    Its very urgent...
    please help me..
    thx in advance
    john

    hi ...
    i did that..
    but..iam gting only 1 msg in monitering...
    evrythn is fine,,,,my scenario shows in MONI black flag...but gting only one msg and the data which i sent to SAP is not storing in SAP..and when i search in SM58 in XI server...i cnt see any messages...
    can u explain me Y..?
    thx for response..
    john

  • How to insert data into the BLOB column

    Hi All,
    Can anyone help me to insert data into the BLOB data type column?
    The table structure is
    CREATE TABLE XXATFL_DM_FORCAST_STG
    TASK_ID NUMBER,
    USER_ID NUMBER,
    CREATED_BY NUMBER(15),
    CREATION_DATE DATE,
    LAST_UPDATED_BY NUMBER(15),
    LAST_UPDATE_DATE DATE,
    LAST_UPDATE_LOGIN NUMBER(15),
    RECORD_STATUS VARCHAR2(1 BYTE),
    ERROR_MESSAGE VARCHAR2(4000 BYTE),
    DATA_FILE BLOB
    I want to insert data in the DATA_FILE column. and this insert statement will in inside a procedure.
    Please help me as soon as possible as this is very urgent for me
    Thanks & Regards,
    Chandan

    i tried like this
    sql> insert into tbl values(1, utl_raw.cast_to_raw('D:\pictures\pic2.bmp'));
    1 record created.
    sql>select * from tbl;
    sp2-0678:Column or attribute type can not be displayed by SQL*PLUS
    sql>
    is this saving only path or bmp file on that path?
    if it is saving bmp file, in which format and how can we retrive it?
    Edited by: user8967883 on Mar 31, 2010 12:57 PM

  • How to insert date into a table by selecting form sysdate

    Hi
    My Table format is like this
    SQL>desc log;
    Name Null? Type
    EMP_ID VARCHAR2(30)
    LOGIN DATE
    LOGOUT DATE
    now when ever an employee logs in i w'd like to insert date into the table.
    i put up the following query
    SQL> insert into log(emp_id,login)
    2 values
    3 ('Ed_01',
    4 select
    5 sysdate
    6 from dual
    7 );
    select
    ERROR at line 4:
    ORA-00936: missing expression
    I got the above error how can i rectify that plz suggest me very urgently as i have to submit my project very early to my boss.

    try this :
    insert into log(emp_id,login) values ('Ed_01', sysdate);

  • How  to  insert data into custom database table from an hcsf

    i want to insert data into database table that i have created from an hcsf.
    example :
    say i have created a table in oracle database and i hav created a hcsf file.now i want that when somebody fills in that hcsf and click submit ,i want that entries should be updated in my database table.
    plzzz reply ASAP(it's urgent)

    you'll need a bit of Java code... extract the data during a check-in filter, and insert it into the database.
    check out the "DataAccess" component in the HowToComponents for query-running examples, and the "DynamicPrefix" component for a check-in filter example.
    I have older copies here:
    http://bezzotech.com/library

  • Error while insert data using execute immediate in dynamic table in oracle

    Error while insert data using execute immediate in dynamic table created in oracle 11g .
    first the dynamic nested table (op_sample) was created using the executed immediate...
    object is
    CREATE OR REPLACE TYPE ASI.sub_mark AS OBJECT (
    mark1 number,
    mark2 number
    t_sub_mark is a class of type sub_mark
    CREATE OR REPLACE TYPE ASI.t_sub_mark is table of sub_mark;
    create table sam1(id number,name varchar2(30));
    nested table is created below:
    begin
    EXECUTE IMMEDIATE ' create table '||op_sample||'
    (id number,name varchar2(30),subject_obj t_sub_mark) nested table subject_obj store as nest_tab return as value';
    end;
    now data from sam1 table and object (subject_obj) are inserted into the dynamic table
    declare
    subject_obj t_sub_mark;
    begin
    subject_obj:= t_sub_mark();
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,subject_obj from sam1) ';
    end;
    and got the below error:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7
    then when we tried to insert the data into the dynam_table with the subject_marks object as null,we received the following error..
    execute immediate 'insert into '||dynam_table ||'
    (SELECT

    887684 wrote:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7The problem is that your variable subject_obj is not in scope inside the dynamic SQL you are building. The SQL engine does not know your PL/SQL variable, so it tries to find a column named SUBJECT_OBJ in your SAM1 table.
    If you need to use dynamic SQL for this, then you must bind the variable. Something like this:
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,:bind_subject_obj from sam1) ' USING subject_obj;Alternatively you might figure out to use static SQL rather than dynamic SQL (if possible for your project.) In static SQL the PL/SQL engine binds the variables for you automatically.

  • Can i insert data in my database from a web intelligence report?

    if that's not possible,can I do it from a stored procedure based Universe or with a derived table? Does BusinessObjects in general allow me to execute statements to insert data in my database?

    Hi Erika,
    afaik it is not possible write back to database from web intelligence .
    from dashboards with web services you can achieve this.

  • Not able to insert data in database via forms

    Hi there. i have been trying to insert data into my database, which i am connected to remotely. i have written some sql code for a button.
    INSERT INTO address_repository VALUES('ADD'|| :address.address_id, :address.address_street_num,
    :address.address_street_name, :address.address_suburb, :address.address_postcode, :address.address_state, :address.address_country);
    where the above are the above are textfield items. my code compiles fine, and no errors are displayed on my form, but when i click the button, nothing happens, and the page is busy, and appears to be processing something, but does nothing.

    don't write
    INSERT INTO address_repository VALUES('ADD'|| :address.address_id, :address.address_street_num,
    :address.address_street_name, :address.address_suburb, :address.address_postcode, :address.address_state, :address.address_country);
    write
    INSERT INTO address_repository (address_id, ....., ....., .....
    VALUES('ADD'|| :address.address_id, :address.address_street_num,
    :address.address_street_name, :address.address_suburb, :address.address_postcode, :address.address_state, :address.address_country);
    if the same error is still active, then we look further, ok?

  • Refresh LOV after inserting data in correspondent table

    Hi all,
    I am using Jdeveloper 11.1.1.2 and ADFBC.
    I have a page with a table (tableA) with some fields. One of them has a LOV associated to another table(tableB). I have a button (button1) that shows a popup(popup1) and opens a new task flow with a fragment to insert data in the tableB.
    After inserting/modifying rows in tableB and after pressing commit (property: end-transaction) or rollback buttons (property: end-transaction and restore save point), LOV does not refresh.
    I have tried to set the property partial triggers of the LOV to button1 or popup1 and it does not work.
    How can I solve it?
    Thank you.
    Andrea

    How about VO for table B ? Did you refresh that ? I didn't use the same VO for table & LOV.
    so in "List data Source" -- VO -- I am using "SQL statement" and statement includes fields from Table B and Table A.
    VO for LDS using "Rows populated by a SQL query with read-only access". I didn't use "Updateable Access through Entity Objects".
    Sample of VO of LDS:
    select A.model_number modelNumber, a.part_number partNumber, b.MODEM_TYPE ModemType
    from table A a,Table B b
    where a.PART_NUMBER_ID = b.PART_NUMBER_ID
    and a.part_number_id =:partID
    Edited by: albertpi on Mar 16, 2010 7:26 AM

Maybe you are looking for