ms access - JDBC Java ALTER TABLE Syntax error -


i'm making program in java ms access database. adapted snipped of program

statement s; string[] tabinfo = {"albara", "tbala"}; s.execute("alter table " + tabinfo[0] + " alter column " +      tabinfo[1] + " set default 0 "); 

what sqlexception: alter table syntax error. i'm doing wrong? have full rights of file. table , columns names right names extracted database metadata , i'm not modifying system tables.

it's program modify db of own used program made several years ago changing db out of question. out of question use of java, clients computer won't install .net framework 3.5 , i'm not going there informatics maintenance.

that query not conform alter table syntax of ms access specified on msdn alter table statement (microsoft access sql)

other sources seem indicate need include data type when setting default, eg

alter table <tablename> alter column <columnname> <columntype> default <defaultvalue> 

(also notice not include set)

this question seems indicate need enable sql server syntax compatibility able use this: sql add column default value - access 2003


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -