Mariusz, Gorzoch tech Blog

an error occurred while executing the command definition

leave a comment »

This message eat few hours of my day and I couldn’t figure out what this is about till I started SQL profiler and found that my entity framework model is generating improper SQL statements. In general my scenario was that I’ve build my app against SQL 2005 and then tried to deploy it on SQL 2000. Unfortunately entity framework is not enough smart to see this difference by himself so I’ve end up getting mentioned above error.

Lucky solution to it is quite simple. I found it on this stack overflow post  : http://stackoverflow.com/questions/1413881/sqlexception-0x80131904-line-28-incorrect-syntax-near 

what you need to do is :

open your model .edmx with xml editor, and modify this

once I’ve did this magic happened and my apps started to fly

Happy 2012 year !


Written by Mariusz Gorzoch

31 December 2011 at 20:49

Posted in Bez kategorii

Tagged with ,

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: