如何使用ucanaccess访问java接口的远程服务器/如何找到远程SQL Server文件路径?

时间:2022-03-22 15:55:13

I know that the code below works for a Microsoft Access Database but I need to switch it to my remote SQL server.

我知道下面的代码适用于Microsoft Access数据库,但我需要将其切换到我的远程SQL服务器。

try {
    String driver = "net.ucanaccess.jdbc.UcanaccessDriver";
    Class.forName(driver);
    conn = DriverManager.getConnection("jdbc:ucanaccess://???SQLSERVERPATH???");
} catch (Exception e) {
    System.out.println(e);
}

So where do I figure out what the server path is ?

那么我在哪里弄清楚服务器路径是什么?

1 个解决方案

#1


0  

The UCanAccess JDBC driver is only designed to work with data stored in Microsoft Access datbase files (.accdb, .mdb). It cannot be used to work with data in a SQL Server database. You will need to use a SQL Server JDBC driver for that (e.g., this one).

UCanAccess JDBC驱动程序仅用于处理存储在Microsoft Access数据库文件(.accdb,.mdb)中的数据。它不能用于处理SQL Server数据库中的数据。您将需要使用SQL Server JDBC驱动程序(例如,这个)。

#1


0  

The UCanAccess JDBC driver is only designed to work with data stored in Microsoft Access datbase files (.accdb, .mdb). It cannot be used to work with data in a SQL Server database. You will need to use a SQL Server JDBC driver for that (e.g., this one).

UCanAccess JDBC驱动程序仅用于处理存储在Microsoft Access数据库文件(.accdb,.mdb)中的数据。它不能用于处理SQL Server数据库中的数据。您将需要使用SQL Server JDBC驱动程序(例如,这个)。