import java.sql.*;
class jdbcshanchu{
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="delete from book  where  author='Ž'";
	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());
		 	  }
	 }
}
