A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

Lei02

初级黑马

  • 黑马币:7

  • 帖子:2

  • 精华:0

© Lei02 初级黑马   /  2021-12-4 11:05  /  2092 人查看  /  0 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

源代码: Class.forName("net.ucanaccess.jdbc.UcanaccessDriver");
             Connection conn1=DriverManager.getConnection("jdbc:ucanaccess://d://data.mdb");
            sql = conn1.prepareStatement("create table Table2 (emloyee_id Number (255))");
                 sql.executeUpdate();
报错信息:
java.lang.UnsupportedOperationException: Cannot write indexes of this type due to unsupported collating sort order SortOrder[2052(0)] for text index (Db=data.mdb;Table=MSysObjects;Index=0)
        at com.healthmarketscience.jackcess.impl.IndexData$ReadOnlyColumnDescriptor.writeNonNullValue(IndexData.java:1839)
        at com.healthmarketscience.jackcess.impl.IndexData$ColumnDescriptor.writeValue(IndexData.java:1523)
        at com.healthmarketscience.jackcess.impl.IndexData.createEntryBytes(IndexData.java:1244)
        at com.healthmarketscience.jackcess.impl.IndexData.prepareAddRow(IndexData.java:581)
        at com.healthmarketscience.jackcess.impl.IndexData.prepareAddRow(IndexData.java:559)
        at com.healthmarketscience.jackcess.impl.TableImpl.addRows(TableImpl.java:1599)
        at com.healthmarketscience.jackcess.impl.TableImpl.addRow(TableImpl.java:1462)
        at com.healthmarketscience.jackcess.impl.DatabaseImpl.addToSystemCatalog(DatabaseImpl.java:1441)
        at com.healthmarketscience.jackcess.impl.DatabaseImpl.addNewTable(DatabaseImpl.java:1068)
        at com.healthmarketscience.jackcess.impl.TableCreator.createTable(TableCreator.java:170)
        at com.healthmarketscience.jackcess.impl.DatabaseImpl.createTable(DatabaseImpl.java:1024)
        at com.healthmarketscience.jackcess.TableBuilder.toTable(TableBuilder.java:212)
        at net.ucanaccess.converters.Persist2Jet.createTable(Persist2Jet.java:425)
        at net.ucanaccess.commands.CreateTableCommand.persist(CreateTableCommand.java:101)
        at net.ucanaccess.jdbc.UcanaccessConnection.flushIO(UcanaccessConnection.java:315)
        at net.ucanaccess.jdbc.UcanaccessConnection.commit(UcanaccessConnection.java:205)
        at net.ucanaccess.jdbc.AbstractExecute.executeBase(AbstractExecute.java:161)
        at net.ucanaccess.jdbc.ExecuteUpdate.execute(ExecuteUpdate.java:50)
        at net.ucanaccess.jdbc.UcanaccessStatement.executeUpdate(UcanaccessStatement.java:220)
        at net.ucanaccess.jdbc.UcanaccessPreparedStatement.executeUpdate(UcanaccessPreparedStatement.java:248)
        at Renewal.ConnectAccessFile(Renewal.java:234)
        at Renewal.main(Renewal.java:225)
Exception in thread "main" net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::3.0.3 Cannot write indexes of this type due to unsupported collating sort order SortOrder[2052(0)] for text index (Db=data.mdb;Table=MSysObjects;Index=0)
        at net.ucanaccess.jdbc.UcanaccessPreparedStatement.executeUpdate(UcanaccessPreparedStatement.java:256)
        at Renewal.ConnectAccessFile(Renewal.java:234)
        at Renewal.main(Renewal.java:225)
Caused by: net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::3.0.3 Cannot write indexes of this type due to unsupported collating sort order SortOrder[2052(0)] for text index (Db=data.mdb;Table=MSysObjects;Index=0)
        at net.ucanaccess.jdbc.UcanaccessStatement.executeUpdate(UcanaccessStatement.java:222)
        at net.ucanaccess.jdbc.UcanaccessPreparedStatement.executeUpdate(UcanaccessPreparedStatement.java:248)
        ... 2 more
Caused by: net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::3.0.3 Cannot write indexes of this type due to unsupported collating sort order SortOrder[2052(0)] for text index (Db=data.mdb;Table=MSysObjects;Index=0)
        at net.ucanaccess.jdbc.UcanaccessConnection.commit(UcanaccessConnection.java:212)
        at net.ucanaccess.jdbc.AbstractExecute.executeBase(AbstractExecute.java:161)
        at net.ucanaccess.jdbc.ExecuteUpdate.execute(ExecuteUpdate.java:50)
        at net.ucanaccess.jdbc.UcanaccessStatement.executeUpdate(UcanaccessStatement.java:220)
        ... 3 more
Caused by: net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::3.0.3 Cannot write indexes of this type due to unsupported collating sort order SortOrder[2052(0)] for text index (Db=data.mdb;Table=MSysObjects;Index=0)
        at net.ucanaccess.jdbc.UcanaccessConnection.flushIO(UcanaccessConnection.java:346)
        at net.ucanaccess.jdbc.UcanaccessConnection.commit(UcanaccessConnection.java:205)
        ... 6 more
Caused by: java.lang.UnsupportedOperationException: Cannot write indexes of this type due to unsupported collating sort order SortOrder[2052(0)] for text index (Db=data.mdb;Table=MSysObjects;Index=0)
        at com.healthmarketscience.jackcess.impl.IndexData$ReadOnlyColumnDescriptor.writeNonNullValue(IndexData.java:1839)
        at com.healthmarketscience.jackcess.impl.IndexData$ColumnDescriptor.writeValue(IndexData.java:1523)
        at com.healthmarketscience.jackcess.impl.IndexData.createEntryBytes(IndexData.java:1244)
        at com.healthmarketscience.jackcess.impl.IndexData.prepareAddRow(IndexData.java:581)
        at com.healthmarketscience.jackcess.impl.IndexData.prepareAddRow(IndexData.java:559)
        at com.healthmarketscience.jackcess.impl.TableImpl.addRows(TableImpl.java:1599)
        at com.healthmarketscience.jackcess.impl.TableImpl.addRow(TableImpl.java:1462)
        at com.healthmarketscience.jackcess.impl.DatabaseImpl.addToSystemCatalog(DatabaseImpl.java:1441)
        at com.healthmarketscience.jackcess.impl.DatabaseImpl.addNewTable(DatabaseImpl.java:1068)
        at com.healthmarketscience.jackcess.impl.TableCreator.createTable(TableCreator.java:170)
        at com.healthmarketscience.jackcess.impl.DatabaseImpl.createTable(DatabaseImpl.java:1024)
        at com.healthmarketscience.jackcess.TableBuilder.toTable(TableBuilder.java:212)
        at net.ucanaccess.converters.Persist2Jet.createTable(Persist2Jet.java:425)
        at net.ucanaccess.commands.CreateTableCommand.persist(CreateTableCommand.java:101)
        at net.ucanaccess.jdbc.UcanaccessConnection.flushIO(UcanaccessConnection.java:315)
        ... 7 more

0 个回复

您需要登录后才可以回帖 登录 | 加入黑马