Hi,
Following is my create table string
String qry1 = "CREATE TABLE ResearchTopic "
+ "(TopicID AutoNumber NOT NULL, "
+ "Name VARCHAR(50) NOT NULL, "
+ "Layer INT NOT NULL, "
+ "ParentName VARCHAR(50) NOT NULL, "
+ "PRIMARY KEY(Name, Layer, ParentName), "
+ "UNIQUE(TopicID))";
When I execute the update, it said there is syntax error for field definition.
Following is the error message.
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in
field definition.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(Unknown Source)
at Database.updateDB(Database.java:55)
at TableCreation.create(TableCreation.java:130)
at TableCreation.main(TableCreation.java:148)
I cannot find the errors in my string. What is wrong? Thank you very much.
Clara