java - How to ALTER TABLE using UCanAccess -


i using ucanaccess jdbc-driver (version 3.0.3.1) connect mdb-file. , need add column existing table. problem statement

alter table temployee add column notificationsenabled binary 

throws exception:

net.ucanaccess.jdbc.ucanaccesssqlexception: ucaexc:::3.x.x feature not supported yet. 

and seems there no newer versions of ucanaccess.

what can in such situation? don`t want use odbc driver many reasons (described here - manipulating access database java without odbc)

the solution see create copy of table (e.g. temployeebackup) save data, drop , recreate original table new field, , move data temployeebackup temployee. solution seems awful me.

ucanaccess versions 4.0.0 , above support alter table, e.g.,

statement stmt = conn.createstatement(); stmt.execute("alter table tablename add column newcol long"); 

Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -