Server Error in '/' Application.

Incorrect syntax near the keyword 'order'.
Invalid usage of the option NEXT in the FETCH statement.

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: Incorrect syntax near the keyword 'order'.
Invalid usage of the option NEXT in the FETCH statement.

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): Incorrect syntax near the keyword 'order'. Invalid usage of the option NEXT in the FETCH statement.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +212 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +81 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +630 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4413 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +58 System.Data.SqlClient.SqlDataReader.get_MetaData() +89 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) +437 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +2616 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +1696 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +64 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +241 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +37 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +10 Dapper.SqlMapper.ExecuteReaderWithFlagsFallback(IDbCommand cmd, Boolean wasClosed, CommandBehavior behavior) in /_/Dapper/SqlMapper.cs:1066 Dapper.<QueryImpl>d__140`1.MoveNext() in /_/Dapper/SqlMapper.cs:1094 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +186 System.Linq.Enumerable.ToList(IEnumerable`1 source) +54 Dapper.SqlMapper.Query(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Boolean buffered, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:734 NewMediaFuture.Class.VideoOP.LoadVideos(String Query) +174 NewMediaFuture.Class.VideoOP.RepeaterVideo(Repeater Re, String Sqlstatment) +182 NewMediaFuture.Class.VideoOP.WatchedVideoPlayList(Repeater Re, String Listid, String Kindid, String Videocount, String videoid) +679 NewMediaFuture.Watching.LoadListesVideo() +413 NewMediaFuture.Watching.Page_Load(Object sender, EventArgs e) +212 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +85 System.Web.UI.Control.OnLoad(EventArgs e) +79 System.Web.UI.<LoadRecursiveAsync>d__246.MoveNext() +221 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64 System.Web.Util.WithinCancellableCallbackTaskAwaiter.GetResult() +30 System.Web.UI.<ProcessRequestMainAsync>d__523.MoveNext() +4609


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