Posts Tagged WHERE Clause

Error in WHERE clause near ‘@’. Unable to parse query text.

I started to build a asp.net web application with MySQL as the backend. I wanted to use the strong typed dataset so that I can know the methods and the columns of my data table before the compile time.

When I wanted some INSERT queries to be performed with my Client Table I got an error message

Error in WHERE clause near ‘@’.
Unable to parse query text.”

The query which I was executing was

SELECT   client_base_info.*
FROM      client_base_info
WHERE  (client_id =@client_id);
SELECT LAST_INSERT_ID();

As I was using MySQL with MySQL connector 6.0.3 I knew something was not right with connector because I was able execute my query in Toad for. I googled a lot before I landed up at bugreport site of MySQL here.

Looks like my guess was right, after I upgraded my MySQL .NET connector from 6.0.3 to 6.0.4, the error was gone.

Hope this helps you. There are other possibilities for this errror which I am not dealing with.

I am learining a lot of best practices with .NET 3.5 wchich I hope later as move on with this project.

TC…..

Advertisements

Comments (2)