rt,我试了网上直连Acces数据库的方法,windows下没有问题,但是在linux下不行,谁能给点提示?谢谢
你怎么连的?
Acces数据库..
你怎么练的呢?
Java code:
static String DBDRIVER = "sun.jdbc.odbc.JdbcOdbcDriver";
static String DBURL = "jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=c:\\db3.mdb";
static String DBUSER = "";
static String DBPASSWORD = "";
static Connection conn = null;
public static void main(String[] args){
try{
Class.forName(DBDRIVER);
conn = DriverManager.getConnection(DBURL, DBUSER, DBPASSWORD);
Statement st=conn.createStatement();
ResultSet rs=st.executeQuery("select * from test");
while(rs.next()){
System.out.println(rs.getObject(1));
}
}catch(Exception e){
System.out.println(e);
}
}
odbc?连
odbc只有在window下才有的啊
liunx下哪里来的odbc
你还是在网上找找jdbc连接access的列子吧
linux下是有odbc的,呵呵,不过我没找到acess的
6楼有希望
private static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl";
private static final String USERNAME = "sys";
private static final String PASSWORD = "s ......