import java.sql.*;
public class testJdbc
{ public static void main(String[] args)
{ try
{Class.forName("Sun.jdbc.odbc.JdbcOdbcDriver");
String Source="jdbc:odbc:myAccess";
Connection con=DriverManger.getConnetion(source);
Statement stmt=con.createStatement();
String sql="select * from user";
ResultSet rs=stmt.executeQuery(sql);
String id, name, pwd;
while(rs.next())
{
id=rs.getString(1);
name=rs.getString(2);
pwd=rs.getString(3);
System.out.println(id+","+name+","+pwd);
}
rs.close();
stmt.close();
con.close();
}
}