Example : How to Delete/Remove data or single record from oracle 10g database.

// Write Java-Oracle 10g Connectivity Code here first properly/globally.

private void jBtnRegDeleteActionPerformed(java.awt.event.ActionEvent evt) 
{    
     String UID = jTxtRegUname.getText().trim();
        try
        {          
            pst=conn.prepareStatement("delete  from REGISTRATION where REGUNAME = '"+UID+"'");
            pst.executeUpdate();
            //out.println("Data Delete Succefully....");
            showMessageDialog(null,"Data Delete Successfully....");
        }
        catch(Exception e)
        {
            System.out.println(e);
        }
}

Loading

Categories: Java Project

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.