import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class jdbc1 { public static void main(String args[]) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc:odbc:student"); Statement s=con.createStatement(); String query="insert into bca values('ravi','baroda')"; s.execute(query); ResultSet rs=s.getResultSet(); s.close(); con.close(); System.out.println("1 Record Inserted"); } catch(Exception e) { System.out.println("Error"); } } }