1

我在 Access mdb 文件中有一个 vba 函数。我正在尝试从 jdbc 运行查询。虽然查询在访问中运行良好,但从 jdbc 我收到一条错误消息:

[Microsoft][ODBC Microsoft Access Driver] Undefined function 'fun' in expression

这是我的代码片段:

Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=xyz.mdb;";
    Connection conn = DriverManager.getConnection(database,"","");  
Statement select = conn.createStatement();
    ResultSet result = select
    .executeQuery("SELECT * FROM table where fun()=1");
4

0 回答 0