public Connection dbConn() {
// Both the remote and local JDatastore drivers use the same
// driver string:
String DRIVER = "com.borland.datastore.jdbc.DataStoreDriver";
// Use this string for the local driver:
String URL = "jdbc:borland:dslocal:";
// Use this string for the remote driver (and start JDataStore Server):
// String URL = "jdbc:borland:dsremote://localhost/";
String FILE = "D:\\JbSwing\\y\\h.jds";
boolean c_open=false;
Connection con = null; try {
Class.forName(DRIVER);
con = DriverManager.getConnection(URL + FILE, "sample", "");
c_open = true;
return con;
}
catch (Exception e) {
System.out.println(e);
return null;
}
}
// Both the remote and local JDatastore drivers use the same
// driver string:
String DRIVER = "com.borland.datastore.jdbc.DataStoreDriver";
// Use this string for the local driver:
String URL = "jdbc:borland:dslocal:";
// Use this string for the remote driver (and start JDataStore Server):
// String URL = "jdbc:borland:dsremote://localhost/";
String FILE = "D:\\JbSwing\\y\\h.jds";
boolean c_open=false;
Connection con = null; try {
Class.forName(DRIVER);
con = DriverManager.getConnection(URL + FILE, "sample", "");
c_open = true;
return con;
}
catch (Exception e) {
System.out.println(e);
return null;
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货