You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
Posted by: mostafa e
Date: January 08, 2015 08:57PM

Hi ,

I am using mySQL Connector version 6.9.5 in my MVC4 web project, when i am trying to execute any usermanager commands such as creating a user in the aspnetusers table, i am getting this error message:


You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM (SELECT
CASE WHEN (`Extent2`.`UserId` IS NULL) THEN (NULL) ELSE (1) END ' at line 33

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: MySql.Data.MySqlClient.MySqlException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM (SELECT
CASE WHEN (`Extent2`.`UserId` IS NULL) THEN (NULL) ELSE (1) END ' at line 33



I am using EF6 version 6.1.2, and mySQL version is : 5.5.4

So i have all latest bits for mysql but i cant get any of the DB operation working on my mvc4 project.

The error seems from the generated sql statement from the MySql.Data.Entity.EF6 assembly that is submitted to the db which has an incorrect syntax!!

Any help is appreciate it!

Thanks a lot.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.