tags:

views:

13

answers:

0

Hi,

I have WCF data service working fine for some entities, but for some of them I have error

    http://localhost/MyDataService.svc/MyEntityName

  <?xml version="1.0" encoding="utf-8" standalone="yes" ?> 
- <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"&gt;
  <code /> 
  <message xml:lang="en-GB">An error occurred while processing this request.</message> 
- <innererror>
  <message>An error occurred while executing the command definition. See the inner exception for details.</message> 
  <type>System.Data.EntityCommandExecutionException</type> 
  <stacktrace>at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues) at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() at System.Data.Objects.ObjectQuery`1.GetEnumeratorInternal() at System.Data.Objects.ObjectQuery.System.Collections.IEnumerable.GetEnumerator() at System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable) at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService) at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description) at System.Data.Services.DataService`1.HandleRequest()</stacktrace> 
- <internalexception>
  <message>Incorrect syntax near 'MyEntityName'.</message> 
  <type>System.Data.SqlClient.SqlException</type> 
  <stacktrace>at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)</stacktrace> 
  </internalexception>
  </innererror>
  </error>

any ideas how to solve this, or how to debug or trace what actually is SQL in question?

thank you

cheers

Valko