jacob21 0 Posting Whiz in Training

hello
I have one problem related procedure when i used it in entity framwork 4,0 that
if i write new query in store procedure then update in entity model then i execute it in an aspx page then its not working well and it give an error .when i make this same query in new stored procedure then it work well after updating in entity framwork model and appy its related condition in same aspx page.then it work well

my query is simple
select distinct username from client

any body help me to solve my problem that what its reason,not playing the storeprocedure query which is add in already made SP.

error is


Server Error in '/dealer_invoice' Application.

The data reader is incompatible with the specified 'INVOICEModel.sp1_ShowData_Result1'. A member of the type, 'address', does not have a corresponding column in the data reader with the same name.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.EntityCommandExecutionException: The data reader is incompatible with the specified 'INVOICEModel.sp1_ShowData_Result1'. A member of the type, 'address', does not have a corresponding column in the data reader with the same name.

Source Error:


Line 904: }
Line 905:
Line 906: return base.ExecuteFunction<sp1_ShowData_Result1>("sp1_ShowData", aParameter, invoice_noParameter, cParameter, aaParameter);
Line 907: }
Line 908:

Source File: c:\Users\Administrator\Documents\Visual Studio 2010\WebSites\dealer_invoice\App_Code\Model.Designer.cs Line: 906

Stack Trace:


[EntityCommandExecutionException: The data reader is incompatible with the specified 'INVOICEModel.sp1_ShowData_Result1'. A member of the type, 'address', does not have a corresponding column in the data reader with the same name.]
System.Data.Query.InternalTrees.ColumnMapFactory.GetMemberOrdinalFromReader(DbDataReader storeDataReader, EdmMember member, EdmType currentType, Dictionary`2 renameList) +2677116
System.Data.Query.InternalTrees.ColumnMapFactory.GetColumnMapsForType(DbDataReader storeDataReader, EdmType edmType, Dictionary`2 renameList) +172
System.Data.Query.InternalTrees.ColumnMapFactory.CreateColumnMapFromReaderAndType(DbDataReader storeDataReader, EdmType edmType, EntitySet entitySet, Dictionary`2 renameList) +24
System.Data.Query.InternalTrees.ColumnMapFactory.CreateFunctionImportStructuralTypeColumnMap(DbDataReader storeDataReader, FunctionImportMapping mapping, EntitySet entitySet, StructuralType baseStructuralType) +72
System.Data.EntityClient.FunctionColumnMapGenerator.System.Data.EntityClient.EntityCommandDefinition.IColumnMapGenerator.CreateColumnMap(DbDataReader reader) +18
System.Data.Objects.ObjectContext.CreateFunctionObjectResult(EntityCommand entityCommand, EntitySet entitySet, EdmType edmType, MergeOption mergeOption) +524
System.Data.Objects.ObjectContext.ExecuteFunction(String functionName, MergeOption mergeOption, ObjectParameter[] parameters) +218
System.Data.Objects.ObjectContext.ExecuteFunction(String functionName, ObjectParameter[] parameters) +53
INVOICEModel.INVOICEEntities.sp1_ShowData(String a, String invoice_no, String c, Nullable`1 aa) in c:\Users\Administrator\Documents\Visual Studio 2010\WebSites\dealer_invoice\App_Code\Model.Designer.cs:906
_Default.Page_Load(Object sender, EventArgs e) in c:\Users\Administrator\Documents\Visual Studio 2010\WebSites\dealer_invoice\Default.aspx.cs:14
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1