源代码: 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
|
|