0

我有这段代码可以使用 UCanAcess 库连接到 Access 数据库。

      public Visualizzazioni_Access() {
        try {
            log=new MyLog4J();

            File dbFile = new File("CassaGestionale.accdb");
            String path = dbFile.getAbsolutePath();
            db=DriverManager.getConnection("jdbc:ucanaccess://"+path);
            connesso=true;
            System.out.println("Connection Succesfull");


        } catch (Exception e) {
            connesso=false;
            log.logStackTrace(e);
        }
    }

该代码有效,所以当我尝试连接时,我有这个调试消息?这是一个错误还是不是?

DEBUG [AWT-EventQueue-0] (DatabaseImpl.java:831) - Finished reading system catalog.  Tables: [CodScontrini, Scontrini]
WARNING:Error in the metadata of the table CodScontrini: table's row count in the metadata is 373 but 374 records have been found and loaded by UCanAccess. All will work fine, but it's better to repair your database.
 WARN [AWT-EventQueue-0] (IndexData.java:328) - unsupported data type BINARY for index, making read-only
Connection Succesfull
4

1 回答 1

1

这是因为检测到实际找到的记录数与名为“CodScontrini”的表的元数据中注册的记录数不一致。这不会导致问题,但通过使用 Access 中的压缩和修复数据库功能,您可以轻松地将表元数据从先前存在一定程度损坏的状态恢复到正确状态。

于 2015-01-26T09:58:12.627 回答