Oracle Auditing for Insert/delete in a Table

Dear Oracle Guru's
I have a Master table for which records are added manually using the Insert command and not by any front end tools.
I have no Auditing for this table , like when an insert/delete is made in to this table.
Does oracle provides any other Tables/views like v$session to find out when such events happens.
Kindly guide me
With Warm Regards
ssr

Probably not.
If your database is in ARCHIVELOG mode and you have the archived logs from the point in time that the DML happened, you could potentially use LogMiner to read the redo logs and get information about when the DML happened and who was responsible. That tends, however, to be a relatively painful manual process that is frequently complicated by the fact that most shops get rid of archived logs as soon as they are no longer necessary for database recovery which is frequently a matter of days or weeks.
Justin

Similar Messages

  • Stored proecedure tutorial for insert, delete, update,select

    I want to integrate the stored procedure in my project
    i am using jsp,
    any one suggest me, stored proecedure tutorial for insert, delete, update,select
    thanx.

    Whether you are using JSP or not should not affect your decision (though I would recommend checking out the MVC pattern, and recommend against doing data access code from your JSP's).
    You simply need one tutorial on how to invoke a stored procedure. The stored procedure you write can have INSERT, SELECT, UPDATE, DELETE, whatever. You simply have to master the concepts involved in java.sql.CallableStatement. (And then you can get more fancy with vendor-specific extensions).
    However, I am a bit confused. You want a tutorial on stored procedures, but then you indicate very normal DML statements like INSERT, UPDATE and DELETE. All of these (queries, DML and stored procedures) fall under the general umberella of JDBC. So, it is always a good place to start with a plain ole JDBC tutorial.
    java.sun.com/docs/books/tutorial/jdbc/index.html
    www.onjava.com/pub/a/onjava/2003/08/13/stored_procedures.html
    - Saish

  • Help for "insert data to variable tables"

    hi, guys.
    I want to make a tool to upload mass-data then insert the data to tables of SAP for integrative test.
    for example, to input the object tablename "AAAA" from screen, the program willl find the information of this table then input the data to the "AAAA" tables.
    But i have no idea how to define the internal table to suit various tables ( by define dynamic table? or any other ways) ,could you kindly give me some advice?
    thanks a lot in advance.
    Message was edited by:
            huijuan zhao

    hi zhao,
    welcome to sdn,
    for your requirement u can use bdc to upload file to internal table then u can update these internal table fileds to sap tables.
    or
    use <b>gui_upload</b> function module to upload data to internal table then u can use just <b>insert</b> keyword to update sap tables.
    see this sample code to update the database table <b>edpar</b>,
    report  zsd_edpar_update no standard page heading.
    *&Purpose:
    *&        program will be used to update EDAPR table on a daily basis.
    *&        This update will be based on Customer Sold To / Ship To partner
    *&        functions assignment. Ship To customer(s) will be linked to
    *&        the appropriate Sold To customer using the ?Acct at Cust?
    *&        number as a reference.  Then, Ship To customer(s) will be
    *&        set up withthe appropriate partner function with the Sold
    *&        To customer.it updated the DB tabel and gives the information
    *&        of customer level visibility t account receivable.
    *define database tables...
    tables: edpar,
            knvv,
            knvp.
    *define types...
    types: begin of t_tab_edpar,
           mandt type mandt,
           kunnr type kunnr,
           parvw type parvw,
           expnr type edi_expnr,
           inpnr type edi_inpnr.
    types: end of t_tab_edpar.
    types: begin of t_tab_knvv,
           kunnr type kunnr,
           vkorg type vkorg,
           vtweg type vtweg,
           spart type spart,
           eikto type eikto.
    types: end of t_tab_knvv.
    types: begin of t_tab_knvp,
           kunnr type kunnr,
           vkorg type vkorg,
           vtweg type vtweg,
           spart type spart,
           parvw type parvw,
           kunn2 type kunn2.
    types: end of t_tab_knvp.
    type-pools: slis.
    *define data statments...
    data: g_tab_edpar type standard table of t_tab_edpar,
          g_wa_edpar  like line of g_tab_edpar.
    data: g_tab_edpar1 type standard table of t_tab_edpar,
          g_wa_edpar1  like line of g_tab_edpar1.
    data: g_tab_edpar2 type standard table of t_tab_edpar,
          g_wa_edpar2  like line of g_tab_edpar2.
    data: g_tab_knvv type standard table of t_tab_knvv,
          g_wa_knvv  like line of g_tab_knvv.
    data: g_tab_knvp type standard table of t_tab_knvp,
          g_wa_knvp  like line of g_tab_knvp.
    data: repid like sy-repid,
          l_tab_fieldcat  type slis_t_fieldcat_alv,
          l_tab_fieldcat1 type slis_t_fieldcat_alv,
          l_tab_fieldcat2 type slis_t_fieldcat_alv,
          layout type slis_layout_alv,
          events  type slis_t_event,
          events1 type slis_t_event,
          wa_events  like line of events,
          l_pos type i.
    *selection screen...
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_cust for knvv-kunnr obligatory,
                    s_sorg for knvv-vkorg,
                    s_dcha for knvv-vtweg,
                    s_divi for knvv-spart,
                    s_parf for knvp-parvw.
    selection-screen end of block b1.
    *start-of-selection...
    perform get_data.
    *to update the db table edpar...
    perform update_edpar.
    *display alv block...
    perform alv_block.
    *&      Form  get_data
          text
    -->  p1        text
    <--  p2        text
    form get_data .
      select kunnr
             vkorg
             vtweg
             spart
             parvw
             kunn2
             from knvp
             into table g_tab_knvp
             where
             kunnr in s_cust
             and
             vkorg in s_sorg
             and
             vtweg in s_dcha
             and
             spart in s_divi
             and
             parvw in s_parf.
      loop at g_tab_knvp into g_wa_knvp.
        move: g_wa_knvp-kunnr to g_wa_edpar-kunnr,
              g_wa_knvp-kunn2 to g_wa_edpar-inpnr,
              g_wa_knvp-parvw to g_wa_edpar-parvw.
        append g_wa_edpar to g_tab_edpar.
      endloop.
      if not g_tab_knvp[] is initial.
        select kunnr
               vkorg
               vtweg
               spart
               eikto
               from knvv
               into table g_tab_knvv
               for all entries in g_tab_knvp
               where
               kunnr eq g_tab_knvp-kunnr
               and
               vkorg eq g_tab_knvp-vkorg
               and
               vtweg eq g_tab_knvp-vtweg
               and
               spart eq g_tab_knvp-spart.
        loop at g_tab_knvp into g_wa_knvp .
          sort g_tab_knvv by kunnr.
          clear g_wa_knvv-eikto.
          read table g_tab_knvv into g_wa_knvv with key kunnr = g_wa_knvp-kunnr.
          if sy-subrc eq 0.
            move: g_wa_knvv-eikto to g_wa_edpar-expnr.
            modify g_tab_edpar from g_wa_edpar transporting expnr where kunnr eq g_wa_knvp-kunnr.
          endif.
        endloop.
      endif.
      sort g_tab_edpar by kunnr.
      delete adjacent duplicates from g_tab_edpar comparing kunnr parvw.
    endform.                    " get_data
    *&      Form  update_edpar
          text
    -->  p1        text
    <--  p2        text
    form update_edpar .
      delete from edpar." FROM TABLE g_tab_delete.
      call function 'DB_COMMIT'.
      loop at g_tab_edpar into g_wa_edpar.
        insert into edpar values g_wa_edpar.
        if sy-subrc  eq 0.
          move-corresponding g_wa_edpar to g_wa_edpar1.
          append g_wa_edpar1 to g_tab_edpar1.
        else.
          move-corresponding g_wa_edpar to g_wa_edpar2.
          append g_wa_edpar2 to g_tab_edpar2.
        endif.
      endloop.
    reward points if helpful,
    regards,
    seshu.

  • How to use record type for inserting data into a table

    I've read through the web the following tip:
    "When working with a large number of columns, using variables of type RECORD is a better approach. With this approach, you do not have to list anything in the INSERT statement, because you are inserting a variable into the table that is defined as a row from the same table."
    I usually define a variable as
    r_mytable     mytable%ROWTYPE;
    and inside my procedure I'll set the fields I need as
    r_mytable.field1 := 1;
    r_mytable.field3 := 7;
    and then I perform the insert as
    insert into mytable
    (field1,
    field3)
    values
    (r_mytable.field1,
    r_mytable.field3);
    According to the tip I've copied above, how can I use the TYPE RECORD of pl/sql for achieving the same result but perhaps in a smarter way?
    Thanks in advance!

    Hi,
    Are you looking for this?
    SQL> create table table1 (id number, descr varchar2(30));
    Table created
    SQL>
    SQL> DECLARE
      2   my_rec table1%rowtype;
      3  BEGIN
      4   my_rec.id := 1;
      5   my_rec.descr := 'TEST';
      6   insert into table1 values my_rec;
      7  END;
      8  /
    PL/SQL procedure successfully completed
    SQL> select * from table1;
       ID DESCR
        1 TESTWorks with UPDATE too :
    SQL> DECLARE
      2   my_rec table1%rowtype;
      3  BEGIN
      4   my_rec.id := 2;
      5   my_rec.descr := 'TEST2';
      6   update table1 set row = my_rec where id = 1;
      7  END;
      8  /
    PL/SQL procedure successfully completed
    SQL> select * from table1;
       ID DESCR
        2 TEST2

  • Insert query for insert all data into table in vb6 but it insert 1 row in table

    This is My insert query in vb6 but it insert 1 row in table
    But i want insert all data in the table which contain the id =1.
    Note that billtabsuport is blank
    i want solution for this
    strSQL = " select * from billtabsuport1 where StockID=" & lblid.Caption
    Set DBrecordset = DBConnection.Execute(strSQL)
    strSQL = " Insert into billtabsuport values('" & DBrecordset("StockID") & "','" & DBrecordset("C_Name") & "','" & DBrecordset("C_Add") & "','" & DBrecordset("C_Mobile") & "','" & DBrecordset("Invoice_No") & "','" & DBrecordset("Date") & "','" & DBrecordset("Order_No") & "','" & DBrecordset("T_Name") & "','" & DBrecordset("Dest") & "','" & DBrecordset("D_Date") & "','" & DBrecordset("Tyres_Serial_No") & "','" & DBrecordset("P_Desc") & "','" & DBrecordset("PR") & "','" & DBrecordset("Branded_NonBranded") & "','" & DBrecordset("Claim_No") & "','" & DBrecordset("Qty") & "','" & DBrecordset("U_Price") & "','" & DBrecordset("I_Value") & "','" & DBrecordset("V_Rate") & "','" & DBrecordset("V_Amt") & "','" & DBrecordset("Size") & "','" & DBrecordset("Pattern") & "','" & DBrecordset("TypesOfStock") & "','" & DBrecordset("TypesOfTube_Flap") & "','" & DBrecordset("VatAmount") & "')"
    DBConnection.Execute (strSQL)

    The syntax for inserting from one set of tables to a new table is:
    insert into newtable
    (field1, field2, etc)
    select somefield1, somefield2, etc
    from some other tables
    where whatever

  • Icons for Insert/Delete Pages to Adobe Acrobat Pro 9.

    I want to add icons for Insert Pages and Delete Pages so that I have quicker access than clicking on the Document option or the Navigation Panel. Used to have this on my old version of Adobe, but it was recently updated at work and I can't figure out how to put them back.

    Hi Eggy72,
    If I understand correctly, you want to customize the toolbars in Acrobat 9 to include the Insert Pages and Delete Pages options?
    If so, please see Show and Hide Toolbar Elements in chapter 2 of the Acrobat 9 Help: http://help.adobe.com/archive/en_US/acrobat/9/professional/acrobat_pro_9.0_help.pdf
    I hope that answers your question!
    Best,
    Sara

  • Inserting, deleting in nested tables

    I am trying to delete and insert to a nested table.
    delete from table (select address from employee where
    employeeId = 1 );
    or
    insert into table (select address from employee where
    employeeId = 1 )
    values ('street', 'city');
    I get the error message:
    <b>ORA-22906: cannot perform DML on expression or on nested
    table view column</b>
    Does anybody know what I am doing wrong?
    Thank you.

    You can select from a nested table like this
    Create table like this
    CREATE TYPE Address AS OBJECT (
    street VARCHAR2(20),
    city VARCHAR2(10)
    We may create a type that is a (nested) table of
    objects of this type by:
    CREATE TYPE AddressTable AS
    TABLE OF Address;
    CREATE TABLE Employees (
    empno number(5),
    addr AddressTable
    NESTED TABLE addr STORE AS
    address_tab;
    SELECT ad.city
    FROM THE(
    SELECT addr
    FROM Employees
    WHERE empno = 123
    ) ad 'You can also add a where clause after this to select a particular address if there are multiple addresses
    Insert
    Insert into employees values (345,
    addresstable ( Address('Street','City')));
    Hope this helps

  • Which trigger to use for insert data into db table in Forms

    Hi,
    My form is current having a database block with table reference. When enter data into form field and click on save button. Automatically the record is inserted into database table.
    I want to make this as manual insert. I changed the data block to a non-database. Where should i write the insert statement in order to insert data into table.
    Is it Key-commit trigger at form level?
    Please advise.
    Thanks,
    Yuvaraaj.

    Hi Yuvaraaj.
    Insert should happen when we click on the save which is inbuilt in the form. In this case where should i write the insert statement.Forms in built save commit's the form data where block is based on database not non database.
    @2nd reply
    Ypu are right. The reason i chnaged the database block to non-database is Currently i have a database block with form field canvas which insert only 1 record in to >table when we click on standard save button. The requirement was to add a field called CHANNEL which should have multiple values displayed. (i created this channel >field in a seperate datablock (non database) and used the same canvas.) When we insert data in all fields (single record) and channel we should be able to selected >multiple channel (say A,B and C) when we click on save then 3 records should be inserted in to the table which looping values for each channel. This was the actual >requirement and this is the reason why iam changing the block to non-database block.You are talking about two blocks.. 1. Master block and 2. Details block name channel
    You are inserting one record in master block then insert 3 record name A,B,C for that master record.
    Now you want master record should insert to each A,B,C record. Means
    'how are you' --master record
    and you want
    'A'- 'how are you'
    'B'- 'how are you'
    'C'- 'how are you'OR
    ?Ok. If you want master record save in database and then want to save non-database(channel) data into database USE Post-Insert trigger at block level and do the rest.
    Hope this helps...
    Hamid
    Mark correct/helpful to help others to get right answer(s).*
    Edited by: HamidHelal on Jan 26, 2013 1:20 AM

  • BAPI req for inserting records in PA2002 table

    Hi,
    I need a BAPI for uploading data from XI to PA2002 table. I need suitable BAPI for inserting in PA2002 table so that i can view the result in PA30 under 2002 IT and 0800 subtype. I have to insert pernr,begda,endda & working hours.
    Kindly help.
    Thanks,
    Ramesh

    Hello Ramesh,
    I dint find any Standard BAPI . But i think you can use this following code and Create a RFC (or) BAPI.
    http://diocio.wordpress.com/2007/04/27/sap-abap-insert-infotype-data-with-maintain-text/
    regards
    Gangaprasad

  • UserExit - In CO02 - For insert & delete component

    In CO02 --> component overview (F6).
    I want to restrict the users to add or delete the components.
    I tried to search the user exit in Report - SAPLCOKO1 but unable to reach.
    Can you help me on it?

    Hi Check these user exits
    PPCO0009                                Enhancement in goods movements for prod. process order
    PPCO0010                                Enhancement in make-to-order production - Unit of measure
    PPCO0012                                Production Order: Display/Change Order Header Data
    PPCO0013                                Change priorities of selection crit. for batch determination
    PPCO0015                                Additional check for document links from BOMs
    PPCO0016                                Additional check for document links from master data
    PPCO0017                                Additional check for online processing of document links
    PPCO0018                                Check for changes to production order header
    PPCO0019                                Checks for changes to order operations
    PPCO0021                                Release Control for Automatic Batch Determination
    PPCO0022                                Determination of Production Memo
    PPCO0023                                Checks Changes to Order Components
    PPCO0008                                Enhancement in the adding and changing of components
    STATTEXT                                Modification exit for formatting status text lines
    CCOWB001                                Customer exit for modifying menu entries
    COIB0001                                Customer Exit for As-Built Assignment Tool
    COZF0001                                Change purchase req. for externally processed operation
    COZF0002                                Change purchase req. for externally procured component
    PPCO0001                                Application development: PP orders
    PPCO0002                                Check exit for setting delete mark / deletion indicator
    PPCO0003                                Check exit for order changes from sales order
    PPCO0004                                Sort and processing exit: Mass processing orders
    PPCO0005                                Storage location/backflushing when order is created
    PPCO0006                                Enhancement to specify defaults for fields in order header
    PPCO0007                                Exit when saving production order

  • Interfaces used for insert/update data in tables

    for providing security the procedures are not allowed to directly insert/update the values in tables.some one suggested that use interfaces for this .i want infomation about this interfaces. how this works and how to use

    An interface is an intermediate set of procedures/functions that do the job for you.
    You haven't explained what it is you're trying to achieve exactly, but here's an example scenario.
    We don't want to allow our developers to query, or write to the tables directly so they are set up with certain database users that have no permissions granted on the tables for such things.
    Instead they have been granted permission to call procedures and functions belonging to another schema, and it is those procedures and functions that do the required table access and/or pass information/data back or write to the tables.
    The developers have to write their applications to call these procedures to do any access to the tables. This means that they are limited to the functionality provided by these interface procedures so, if there is internal auditing or columns of data etc. on the tables then it may be that they can't access this data, but only the "user facing" data.
    The interface can also ensure that data meets certain requirements before being written to tables, allowing for business or technical level restrictions to be implemented.

  • Insert data from source table to destination table dependning up on a criteria.once inserted delete from source table.

    HI,
    I have a source table with millions of records .I need to insert some of the data (depending on a condition) to a repository table.
    Once they are inserted they can be deleted from the source table.
    The deletion is taking a lot of time .
    I need to reduce the time to delete the records.
    ex:-  1 million records in 8 seconds.
    Had already used bulk collect and cursors but cannot succeed.
    Please suggest how to increase the performance.
    Thanks & Regards

    APPROACH 1:-
    CREATE OR REPLACE PROCEDURE SP_BC
    AS
    DETAILS_REC SOURCETBL%ROWTYPE;
    COUNTER NUMBER:=1;
    RCOUNT NUMBER:= 1;
    START_TIME PLS_INTEGER;
    END_TIME PLS_INTEGER;
    CURSOR C1 IS
    SELECT * FROM SOURCETBL WHERE DOJ<SYDATE;
    BEGIN
    START_TIME := DBMS_UTILITY.GET_TIME;
        DBMS_OUTPUT.PUT_LINE(START_TIME/100);
        OPEN C1;
        LOOP
        FETCH C1 INTO DETAILS_ROW;
        EXIT WHEN  C1%NOTFOUND;
               BEGIN
                EXIT WHEN COUNTER >10000;
                INSERT INTO DESTINATIONTBL VALUES DETAILS_REC;
                IF SQL%FOUND THEN
                    DELETE FROM SOURCETABLE WHERE ID= DETAILS_REC.ID;
                  COUNTER:=COUNTER+1;
            END IF; 
        COMMIT;
            END;
         COUNTER:=1;
        END LOOP;
        COMMIT;
    END;
    APPROACH 2:-
        CREATE OR REPLACE PROCEDURE SP_BC1
    IS
    TYPE T_DET IS TABLE OF SOURCETBL%ROWTYPE;
    T_REC T_DET;
    BEGIN   
        SELECT *  BULK COLLECT INTO T_REC FROM SOURCETBL
         WHERE NAME=@NAME;
        FOR I IN  T_REC .FIRST ..T_REC .LAST
           LOOP
             INSERT INTO DESTINATIONTBL VALUES T_REC (I);
          IF SQL%FOUND THEN
          DELETE FROM SOURCETBL WHERE ID =
           WHERE ID = T_REC (I).ID;  
           END IF; 
           EXIT WHEN T_REC=0;
        END LOOP;
        COMMIT;
    END;
    APPROACH 3:-
    CREATE OR REPLACE PROCEDURE SP_BC2
    AS
    TYPE REC_TYPE IS TABLE OF SOURCETBL%ROWTYPE ;
    DETAILS_ROW REC_TYPE;
    CURSOR C1 IS
    SELECT * FROM
         SOURCETBL WHERE END<SYSDATE;
        BEGIN
        OPEN C1;
        LOOP
        FETCH C1 BULK COLLECT INTO DETAILS_ROW LIMIT 999;
        FORALL I IN 1..DETAILS_ROW.COUNT
                  /* A BATCH OF 999 RECORDS WILL BE CONSIDERED FOR DATA MOVEMENT*/
    INSERT INTO DESTINATIONTBL VALUES DETAILS_ROW(I);
    --            IF SQL%FOUND  THEN
    --                DELETE from SOURCETBL WHERE ID IN DETAILS_ROW(I).ID;
    --           END IF;
            EXIT WHEN  C1%NOTFOUND; 
        COMMIT;   
        END LOOP;
        COMMIT;
    3rd approach seems better but i have an issue with referring the fileds of a record type.

  • Query is taking too much time for inserting into a temp table and for spooling

    Hi,
    I am working on a query optimization project where I have found a query which takes hell lot of time to execute.
    Temp table is defined as follows:
    DECLARE @CastSummary TABLE (CastID INT, SalesOrderID INT, ProductionOrderID INT, Actual FLOAT,
    ProductionOrderNo NVARCHAR(50), SalesOrderNo NVARCHAR(50), Customer NVARCHAR(MAX), Targets FLOAT)
    SELECT
    C.CastID,
    SO.SalesOrderID,
    PO.ProductionOrderID,
    F.CalculatedWeight,
    PO.ProductionOrderNo,
    SO.SalesOrderNo,
    SC.Name,
    SO.OrderQty
    FROM
    CastCast C
    JOIN Sales.Production PO ON PO.ProductionOrderID = C.ProductionOrderID
    join Sales.ProductionDetail d on d.ProductionOrderID = PO.ProductionOrderID
    LEFT JOIN Sales.SalesOrder SO ON d.SalesOrderID = SO.SalesOrderID
    LEFT JOIN FinishedGoods.Equipment F ON F.CastID = C.CastID
    JOIN Sales.Customer SC ON SC.CustomerID = SO.CustomerID
    WHERE
    (C.CreatedDate >= @StartDate AND C.CreatedDate < @EndDate)
    It takes almost 33% for Table Insert when I insert the data in a temp table and then 67% for Spooling. I had removed 2 LEFT joins and made it as JOIN from the above query and then tried. Query execution became bit fast. But still needs improvement.
    How I can improve further. Will it be good enough if I create Indexes on the columns for the temp table and try.or what If I use derived tables?? Please suggest.
    -Pep

    How I can improve further. Will it be good enough if I create Indexes on the columns for the temp table and try.or what If I use derived tables??
    I suggest you start with index tuning.  Specifically, make sure columns specified in the WHERE and JOIN columns are properly indexed (ideally clustered or covering, and unique when possible).  Changing outer joins to inner joins is appropriate
    if you don't need outer joins in the first place.
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • Need help for record deletion from custom table

    Hi friends
    I have to write a custom program which will be generic to delete any table record with date field.
    This program needs to be generic (should be able to delete records from any custom table) in nature with selection screen parameters as:
    Table Name and Number of Days prior to which records are deleted, both mandatory.
    Program Flow:
    1.     From number of days calculate date before which records are deleted, ( current date u2013 no. of days = past date).
    2.     Custom table have date field, delete records prior to that date.
    3.     Program may be scheduled for background job, put default values for both fields. No. of days should not be less than 60.
    4.     Classical Report output with number of records deleted.
    My query is how will I know the name of the Date field so that I can write a DELETE query.
    If I use 'DDIF_FIELDINFO_GET' it gives me all field names but how to filter out?
    with regards
    samikhya

    Hi
    I have added  field on the selection screen as p_fieldname and got the F4 help for it , so that the user will get the field name run time as per the table name.
    Now I am facing problem while writing the DELETE query.
    I wrote like
    DELETE (fp_tab)
    where (fp_fieldname) LE date
    It is not working. I also tried with taking a string to concatenate fp_fieldname, LE and date to l_string
    when I write like this:
    DELETE (fp_tab)
    where (l_string) , sy-subrc is getting 4 and no records are getting deleted.
    I do not understand where the dynamic Delete is failing??
    with reagards
    Samikhya

  • Asking help for INSERT, DELETE, UPDATE, SELECT

    I have to build a program that is like a bridge from the dabase hsqldb and the final user.
    So the user has the options of SERCH, EDIT, INSERT or DELETE a register/field/row whatever.
    Remember that the values are entered by the user, so I don't know the field to be edited, deleted, etc...
    I would thank a lot if you could put some code to do all these operations.
    But please, if you won't post the codes please don't post nothing else.
    I need the example codes!
    Thanks if you can give me a hand.

    I Just need to understand what's wrong with my code:
    // call this when user presses insert button...
    public void insertRegister() {
    String title = "Inserting new register...";
    String tempId = JOptionPane.showInputDialog(null, "Enter ID Client:", title, 3);
    int id = Integer.parseInt(tempId);
    String name = JOptionPane.showInputDialog(null, "Enter name Client:", title, 3);
    String tel = JOptionPane.showInputDialog(null, "Enter tel Client:", title, 3);
    try {
    // Setting up the PreparedStatement
    PreparedStatement preparedStatement = connection.prepareStatement("INSERT INTO CLIENTS (id_client, name_client, tel_client) VALUES(?,?,?)");
    // Now we insert the real values for PreparedStatement and execute it!
    preparedStatement.setInt(1, id);
    preparedStatement.setString(2, name.toUpperCase());
    preparedStatement.setString(3, tel);
    preparedStatement.executeUpdate();
    catch(SQLException s) { s.printStackTrace(); }
    // call this when user presses delete button...
    public void deleteRegister() {
    try {
    // Setting up the PreparedStatement
    PreparedStatement preparedStatement = connection.prepareStatement("DELETE FROM CLIENTS WHERE id_client = ?");
    String tempId = JOptionPane.showInputDialog(null, "Enter ID Client to be deleted:", "Deleting register...", 3);
    int id = Integer.parseInt(tempId);
    preparedStatement.setInt(1, id);
    preparedStatement.executeUpdate();
    catch(SQLException s) { s.printStackTrace(); }
    // Of couse I don't want anyone coding for me...
    // But if I'm not asking too much, just please someone tell me what's wrong with my code, and how to fix it. That's all.

Maybe you are looking for

  • Can I have 2 playlists for 2 ipods on one I tunes?

    I have a Ipod touch and just bought my son one as well. How do i keep the "bad" songs off his ipod while enjoying them myself. We use the same laptop, although another is available. Do I need to set up another itunes account

  • LPX-00601: Invalid token in: err while trying to read data from xml

    Hey , While trying to read data from xml i got err: LPX-00601: Invalid token in: 'path' the proc. i'm using to read data from the xml is: procedure read_xml_file_test (in_filename in varchar2) is my_dir  varchar2(20) := 'XML_DIR;   cur_emp2 number:=0

  • Trading Partner field in GL entry

    We are in ECC6. We want to enter manually the 'Trading Partner' field in certain GL postings. But when we enter the GL document using F-02, this field is not appearing for input. We looked in additional data fields also. But not available. We are usi

  • How to Update multiple items in other list using event handler?

    Hi All, If i update a item in a list, then i should update multiple items in another list need to be update. How to achive using event receivers?

  • I'm missing older, non-archived messages in my IMAP inbox

    I'm running T-Bird 31.2.0 on a Win 7 PC. I use T-Bird as an IMAP desktop client. Recently I noticed that all my messages earlier than 10/12/2014 have disappeared from my Inbox. When I run a search, the missing messages show up in the search results,