I am using UCanAccess JDBC-driver (version 3.0.3.1) to connect to the mdb-file. And I need to add the column to existing table. The problem is that the statement
ALTER TABLE TEmployee ADD COLUMN NotificationsEnabled BINARY
throws the exception:
net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::3.x.x Feature not supported yet.
And it seems like there is no newer versions of UCanAccess.
What can I do in such a situation? I don`t want to use the ODBC driver for many reasons (described here - Manipulating an Access database from Java without ODBC)
The only solution that I see is to create the copy of the table (e.g. TEmployeeBackup) to save the data, then drop and recreate the original table with new field, and then move the data back from TEmployeeBackup to TEmployee. But this solution seems awful to me.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…