EntitySqlException: The syntax of the command argument '@0' is invalid.

dynamic-linq

Question

When I send this, I receive the following error:

DataContext.DBProjectEntities.Projects.Where(xWhere, parameterList.ToArray)

The command parameter syntax '@0' is not valid. Near line 6, column 37.

  • xWhere is a string with a value."(ProjectStatuses.Any(DepartmentID = @0))"
  • parameterList is Dim parameterList As New List(Of ObjectParameter)

It has a single element of type Int32 with value 1, which is the type of DepartmentID.

1
0
9/15/2011 5:38:02 PM

Popular Answer

I understood it. I had been use dynamic.vb from an outside assembly. I have an import statement for that assembly in my code, but I also required a system import. linq.dynamic

0
9/16/2011 1:33:05 PM


Related Questions





Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow