[英]Vaadin error : com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'LIMIT'
I'm trying a sample with Vaadin + Sql Server. 我正在尝试使用Vaadin + Sql Server的示例。
After create a JDBCConnectionPool I have the following : 创建JDBCConnectionPool之后,我将具有以下内容:
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 ? 有什么帮助吗?
I guess this isn't Vaadin-related: it seems to me that the problem is that JDBC thinks it's talking to a MySQL database (LIMIT is a MySQL reserved word); 我想这与Vaadin无关:在我看来,问题在于JDBC认为它正在与MySQL数据库通信(LIMIT是MySQL的保留字); you need to re-check your configuration (about which I can't be of help, but if you post it others could review it).
您需要重新检查您的配置(对此我无济于事,但是如果您发布它,则其他人可以查看它)。
You should use MSSQLGenerator instead of DefaultSQLGenerator. 您应该使用MSSQLGenerator而不是DefaultSQLGenerator。 DefaultSQLGenerator uses the LIMIT clause and not MSSQLGenerator.
DefaultSQLGenerator使用LIMIT子句,而不使用MSSQLGenerator。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.