Server Error in '/' Application.

There was a problem getting a list of celebrityHeights Incorrect syntax near 'Neill'.
Unclosed quotation mark after the character string ' ORDER BY searches desc'.

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.ApplicationException: There was a problem getting a list of celebrityHeights Incorrect syntax near 'Neill'.
Unclosed quotation mark after the character string ' ORDER BY searches desc'.

Source Error:


Line 498:            catch (SqlException ex)
Line 499:            {
Line 500:                throw new ApplicationException("There was a problem getting a list of celebrityHeights " + ex.Message);
Line 501:            }
Line 502:        }

Source File: C:\Websites\MrHeightProject\MrHeightProject\App_Code\database.cs    Line: 500

Stack Trace:


[ApplicationException: There was a problem getting a list of celebrityHeights Incorrect syntax near 'Neill'.
Unclosed quotation mark after the character string ' ORDER BY searches desc'.]
   database.similarCats(String category, String name, String gender) in C:\Websites\MrHeightProject\MrHeightProject\App_Code\database.cs:500
   celebrity.Page_Load(Object sender, EventArgs e) in C:\Websites\MrHeightProject\MrHeightProject\celebrity.aspx.cs:438
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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