import java.sql.*;

public class jdbc_odbc_example1 {
public static void main(String args[]){
	Connection   con;
	Statement sql;
	 ResultSet rs;
	try
	{
	   	 Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
	 }
	   	 catch(ClassNotFoundException e)
	       {
	   	 	System.out.println(""+e);
	   	 }
	   	try
		{     con=DriverManager.getConnection
		("jdbc:odbc:redsun1","sa","4214055");
		 sql=con.createStatement();
		 sql.executeUpdate("update chengjibiao set 英语=88 where 姓名='王名' ") ;
		 rs=sql.executeQuery("select *  from chengjibiao");
		 while(rs.next()){
		   	   String name=rs.getString("姓名");
		   	   int english=rs.getInt("英语");
		   	System.out.println("姓名："+name);
		   	System.out.println("英语："+english);
		   	  }
		   
		con.close( );
       

		}
		catch(SQLException e){  }
		


   }
}
