During the execution of the command definition, an error occurred. Details may be found in the inner exception.

entity-framework

Question

I am experiencing an issue with the edit function in my mvc asp.net application: supplied code

public ActionResult Edit(int id)
{

      var res = (from r in objeEntities.DocumentationsSet.Include("DocStatus")
                where r.textid == id select r)
                .First();
}

This exception is occurring to me:

Source : System.Data.Entity

Stack Trace : 
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.GetEnumerator()
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at System.Data.Objects.ELinq.ObjectQueryProvider.b__0[TResult](IEnumerable`1 sequence) 
at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
at System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[S](Expression expression)
at System.Linq.Queryable.First[TSource](IQueryable`1 source)
at admin.com.Controllers.DocsGridController.Edit(Int32 id) in c:\Data\FinalCode\AC015\acomMVCSourceCode\admincom\Controllers\DocsController.cs:line
   307

Message : An error occurred while executing the command definition. See the inner exception for details.

When I connect to a remote server, I get this error.

What mistake is this? How can I correct it?

1
34
7/1/2014 12:15:34 AM

Popular Answer

This often indicates that a column has been renamed or is missing and that your schema and mapping files are out of sync.

54
10/21/2010 12:24:26 PM


Related Questions





Related

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