简体   繁体   English

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

[英]How do I use ucanaccess to access a remote server for a java interface / how do I find my remote SQL Server file path?

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 Server。

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 ? 那么我在哪里弄清楚服务器路径是什么?

The UCanAccess JDBC driver is only designed to work with data stored in Microsoft Access datbase files (.accdb, .mdb). UCanAccess JDBC驱动程序仅设计用于处理存储在Microsoft Access datbase文件(.accdb,.mdb)中的数据。 It cannot be used to work with data in a SQL Server database. 它不能用于处理SQL Server数据库中的数据。 You will need to use a SQL Server JDBC driver for that (eg, this one ). 为此,您将需要使用SQL Server JDBC驱动程序(例如, 驱动程序)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM