com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'LIM

Hi,

I’m trying a sample with Vaadin + Sql Server.

After create a JDBCConnectionPool I have the following :

TableQuery tq = new TableQuery(“myTableName”, MyJDBCConnectionPool); tq.setVersionColumn(“MyIdColName”); SQLContainer container = new SQLContainer(tq);

Then I got this error :

com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ‘LIMIT’

Any help please ?

Bonjour,
you have to use the MSSQLGenerator instead of the DefaultSQLGenerator :

SQLGenerator generator = new MSSQLGenerator(“'”, “'”);
TableQuery tq = new TableQuery(nomTable, connectionPool, generator);

à bientôt,