import java.sql.*;
import java.util.*;
class delete
{
public static void main(String[] argv)
{
try
{
Scanner sc=new Scanner(System.in);
String roll;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String database="jdbc:odbc:eceDSN";
Connection con=DriverManager.getConnection(database,"","");
System.out.println("DATABASE OF ECE is Connected");
System.out.println("Enter The Roll No");
roll=sc.nextLine();
PreparedStatement ps=con.prepareStatement("delete from ECE where roll=?");
ps.setString(1,roll);
//create a statement object
//Statement st=con.createStatement();
//Execute the statement
int result=ps.executeUpdate();
if(result==1)
{
System.out.println("Record is Deleted Successfully");
}
con.close();
}
catch(Exception err)
{
System.out.println(err.getMessage());
}
//loading all the driver to the memory
}
}