Hi, HC v1.8.7 Pro. We have a client site where they have found that the Admin->Customer Search has stopped working. So on the Customers page, we enter a search value and click the search button. We then get a .net error page with this content: ------------------------------------------------------------------------------------------------------ Server Error in '/' Application. Conversion failed when converting the nvarchar value 'Richard' to data type int. 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.SqlClient.SqlException: Conversion failed when converting the nvarchar value 'Richard' to data type int. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SqlException (0x80131904): Conversion failed when converting the nvarchar value 'Richard' to data type int.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +3180300 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +332 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4224 System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) +273 System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) +291 System.Data.SqlClient.SqlDataReader.Read() +42 System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.StoreRead() +36 [EntityCommandExecutionException: An error occurred while reading from the store provider's data reader. See the inner exception for details.] System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.HandleReaderException(Exception e) +185 System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.StoreRead() +72 System.Data.Entity.Core.Common.Internal.Materialization.SimpleEnumerator.MoveNext() +47 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +240 System.Linq.Enumerable.ToList(IEnumerable`1 source) +44 Hotcakes.Commerce.Dnn.DnnCustomerAccountRepository.FindByFilter(String filter, Int32 pageNumber, Int32 pageSize, Int32& totalCount) in d:\Projects_2\Hotcakes\HCC\Releases\1.08.xx\Libraries\Hotcakes.Commerce.Dnn\DnnCustomerAccountRepository.cs:175 Hotcakes.Modules.Core.Admin.People.Default.LoadUsers() in d:\Projects_2\Hotcakes\HCC\Releases\1.08.xx\Website\DesktopModules\Hotcakes\Core\Admin\People\Default.aspx.cs:105 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3423 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2558.0 --------------------------------------------------------------------------------------------------------- We did some SQL profiling to see what was causing this issue and this SQL is the culprit: exec sp_executesql N'SELECT [Project1].[UserID] AS [UserID] FROM ( SELECT [Extent1].[UserID] AS [UserID] FROM (SELECT [vw_Profile].[UserID] AS [UserID], [vw_Profile].[PortalID] AS [PortalID], [vw_Profile].[PropertyName] AS [PropertyName], [vw_Profile].[PropertyValue] AS [PropertyValue], [vw_Profile].[Visibility] AS [Visibility] FROM [dbo].[vw_Profile] AS [vw_Profile]) AS [Extent1] WHERE ([Extent1].[PropertyValue] LIKE @p__linq__0 ESCAPE N''~'') OR ([Extent1].[PropertyValue] LIKE @p__linq__1 ESCAPE N''~'') ) AS [Project1] ORDER BY [Project1].[UserID] ASC',N'@p__linq__0 nvarchar(4000),@p__linq__1 nvarchar(4000)',@p__linq__0=N'%alison%',@p__linq__1=N'%alison%' Any ideas why this might have started happening? Many thanks Dan
|