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

2 Comments »

  1. Kirshna said

    Really helped me thanks for the post…saved me some time from searching more….

  2. LnddMiles said

    The best information i have found exactly here. Keep going Thank you

RSS feed for comments on this post · TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: