import java.sql.*;
class jdbccx{
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();
		//ѯݿеıstudentеļ¼
		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());
			 	  }
		 }
}
