Home > Back-end >  Use ucanaccess connection access, can't create a table
Use ucanaccess connection access, can't create a table

Time:12-06

After connecting the access, can query, update, etc., but create wouldn't,
Jdk1.7 access2016
It took more than N online method, which is the nearest way, feeling is not a problem statement, because I tried many times different statements,
Public int Creattable (Connection Connection) throws the Exception {
The Statement STMT=connection. CreateStatement ();
String SQL="create table test01 (emloyee_id Int primary key, num Int)";

Int result=STMT. ExecuteUpdate (SQL);

Connection. The close ();
return result;

}
My small white, your advice!

Java. Lang. UnsupportedOperationException: always write the indexes of this type due to unsupported collating the sort order SortOrder [2052] (0) for text index (Db=note. Accdb; Table=MSysObjects; The Index=0)
At com. Healthmarketscience. Jackcess. Impl. $ReadOnlyColumnDescriptor IndexData. WriteNonNullValue (IndexData. Java: 1839)
At com. Healthmarketscience. Jackcess. Impl. $ColumnDescriptor IndexData. 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.com mands. CreateTableCommand. Persist (CreateTableCommand. Java: 101)
At net. Ucanaccess. JDBC. UcanaccessConnection. FlushIO (UcanaccessConnection. Java: 315)
At MIT (205) UcanaccessConnection. Java: net.ucanaccess.jdbc.UcanaccessConnection.com
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 the Main. View. Main. Creattable (91). The Main Java:
At the Main. View. The Main. The Main (50). The Main Java:
The Exception in the thread "main".net. Ucanaccess. JDBC. UcanaccessSQLException: UCAExc: : : 3.0.3 always write the indexes of this type due to unsupported collating the sort order SortOrder [2052] (0) for text index (Db=note. Accdb; Table=MSysObjects; The Index=0)
At net. Ucanaccess. JDBC. UcanaccessStatement. ExecuteUpdate (UcanaccessStatement. Java: 222)
At the Main. View. Main. Creattable (91). The Main Java:
At the Main. View. The Main. The Main (50). The Main Java:
Under Caused by: net. Ucanaccess. JDBC. UcanaccessSQLException: UCAExc: : : 3.0.3 always write the indexes of this type due to unsupported collating the sort order SortOrder [2052] (0) for text index (Db=note. Accdb; Table=MSysObjects; The Index=0)
At MIT (212) UcanaccessConnection. Java: net.ucanaccess.jdbc.UcanaccessConnection.com
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)
. 2 more
Under Caused by: net. Ucanaccess. JDBC. UcanaccessSQLException: UCAExc: : : 3.0.3 always write the indexes of this type due to unsupported collating the sort order SortOrder [2052] (0) for text index (Db=note. Accdb; Table=MSysObjects; The Index=0)
At net. Ucanaccess. JDBC. UcanaccessConnection. FlushIO (UcanaccessConnection. Java: 346)
At MIT (205) UcanaccessConnection. Java: net.ucanaccess.jdbc.UcanaccessConnection.com
. 5 more
Under Caused by: Java. Lang. UnsupportedOperationException: always write the indexes of this type due to unsupported collating the sort order SortOrder [2052] (0) for text index (Db=note. Accdb; Table=MSysObjects; The Index=0)
At com. Healthmarketscience. Jackcess. Impl. $ReadOnlyColumnDescriptor IndexData. WriteNonNullValue (IndexData. Java: 1839)
At com. Healthmarketscience. Jackcess. Impl. $ColumnDescriptor IndexData. 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)
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related