Using Database Operations

The Delete Operation

ProcedureTo perform a delete operation on a table:

  1. Execute the delete() method.

    In this example DELETE an employee.


    package prjJDBC_JCDjcdALL;
    
    public class jcdDelete
    {
    
        public com.stc.codegen.logger.Logger logger;
    
        public com.stc.codegen.alerter.Alerter alerter;
    
        public com.stc.codegen.util.CollaborationContext collabContext;
    
        public com.stc.codegen.util.TypeConverter typeConverter;
    
        public void receive( com.stc.connector.appconn.file.
    FileTextMessage input, dtd.otdInputDTD_1394195520.DBemployees
     otdInputDTD_DBemployees_1, otdJDBC.OtdJDBCOTD otdJDBC_1,
     dtd.otdOutputDTD882991309.DBemployee otdOutputDTD_DBemployee_1,
     com.stc.connector.appconn.file.FileApplication FileClient_1 )
            throws Throwable
        {
            FileClient_1.setText( "Delete record .." );
            FileClient_1.write();
            otdJDBC_1.getDB_EMPLOYEE().delete( input.getText() );
            FileClient_1.setText( "Done delete." );
            FileClient_1.write();
        }
    
    }