import java.sql.*;
public class Access
{
public static void main(String args[])
{
try
{
String strurl="jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=books.mdb";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection(strurl) ;
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery("select * from books");
if(rs.next())
{
System.out.println(rs.getString("簡介"));
}
}catch(Exception e)
{
System.out.println(e);
}
}
}

--------------------------
09博客園紀念T恤新聞:
微軟正式對Word禁售令提起上訴 稱法官不懂法網(wǎng)站導航:
博客園首頁 個人主頁 新聞 社區(qū) 博問 閃存 找找看文章來源:
http://www.cnblogs.com/xiaoao808/archive/2009/05/08/1452661.html
posted on 2009-05-08 15:08
破名超難起 閱讀(183)
評論(0) 編輯 收藏