Sökning med mellanslag
Halloj!
Jag gjorde just en sökning på en sträng som innehöll ett mellanslag och fick det här felmeddelandet:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Syntax error in search condition, or empty or null search condition 'ere rer'.
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: Syntax error in search condition, or empty or null search condition 'ere rer'.
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
Stack Trace:
[SqlException: Syntax error in search condition, or empty or null search condition 'ere rer'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +643
System.Data.SqlClient.SqlCommand.ExecuteXmlReader() +30
Aktieguiden.Net.Dal.Thread.Search(String connectionString, Object number, Object userID, Object groupID, Object searchString, Object type, Object startDate, Object endDate) +674
Aktieguiden.Net.Bll.Group.SearchGroup(String searchString, Int32 results, Int32 type, String startdate, String enddate) +127
Aktieguiden.Docs.Message.ListThreads.RenderThreads() +592
ASP.listthreads_aspx.__Render__control1(HtmlTextWriter __output, Control parameterContainer) +2240
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +27
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Page.ProcessRequestMain() +1900
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.288; ASP.NET Version:1.0.3705.288
Bästa hälsningar
Basswood
Tack för ditt snabba svar!
Det fungerar bra att göra som du skrev :) upptäckte däremot att jag inte kan kopiera text med Ctrl+C från aktieguidens sidor, men det fungerar överallt annars. Vad kan det bero på?
Vänliga hälsningar
Magnus
hehe Johan, nu får du allt lämna tillbaka våra Crtl-knappar ;-)
AktieTrader
Visa sida
Ogilla! 0
Gilla!