import java.sql.*;
class jdbcxiugaijilu{
public static void main (String args[]){
try{
	Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
	}catch(ClassNotFoundException ce){
		System.out.println("SQLException:"+ce.getMessage());
		}
try{
	Connection conn=
	DriverManager.getConnection("jdbc:odbc:mylibDB");
		Statement stmt=conn.createStatement();
 		//޸ļ¼
 		String sql="update  book set no='20090110'where name='java'";
 		stmt.executeUpdate(sql);
   		//ʾѯĽ
 		ResultSet rs=stmt.executeQuery("select * from book");
 		while(rs.next())
	{
		//еļ¼ʾֶ
		System.out.println(":"+rs.getString("no")+"\t"+
		":"+rs.getString("name")+"\t"+
		"ߣ"+rs.getString("author")+"\t"+"ڣ"+rs.getDate(4)+"\t"+
"Σ"+rs.getInt(5)+"\t"+"۸"+rs.getFloat(6));
		 }
		 //ر
		 rs.close();
		 stmt.close();
		 }catch(SQLException ce){
		 	  System.out.println("SQLException"+ce.getMessage());
		 	  }
	 }
} 
