Server Error in '/rayanddregs' Application.

The definition for column 'int' must include a data type.
Incorrect syntax near ')'.
The sum function requires 1 argument(s).
Incorrect syntax near the keyword 'FROM'.
Incorrect syntax near ')'.
Incorrect syntax near the keyword 'FROM'.
Incorrect syntax near 'dbo'.
Incorrect syntax near 'dbo'.
Incorrect syntax near the keyword 'FROM'.
Incorrect syntax near ')'.

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: The definition for column 'int' must include a data type.
Incorrect syntax near ')'.
The sum function requires 1 argument(s).
Incorrect syntax near the keyword 'FROM'.
Incorrect syntax near ')'.
Incorrect syntax near the keyword 'FROM'.
Incorrect syntax near 'dbo'.
Incorrect syntax near 'dbo'.
Incorrect syntax near the keyword 'FROM'.
Incorrect syntax near ')'.

Source Error:


Line 365:cmdSelect.CommandTimeout = 300
Line 366:conPubs.Open()
Line 367:dtrRoster=cmdSelect.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
Line 368:			
Line 369:if dtrRoster.HasRows then

Source File: D:\HTTP\wwwroot\HockeyDraft.ca\rayanddregs\view_roster.aspx    Line: 367

Stack Trace:


[SqlException (0x80131904): The definition for column 'int' must include a data type.
Incorrect syntax near ')'.
The sum function requires 1 argument(s).
Incorrect syntax near the keyword 'FROM'.
Incorrect syntax near ')'.
Incorrect syntax near the keyword 'FROM'.
Incorrect syntax near 'dbo'.
Incorrect syntax near 'dbo'.
Incorrect syntax near the keyword 'FROM'.
Incorrect syntax near ')'.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +212
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +245
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2843
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +127
   System.Data.SqlClient.SqlDataReader.get_MetaData() +112
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6359556
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6360625
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +424
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +211
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +87
   ASP.view_roster_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in D:\HTTP\wwwroot\HockeyDraft.ca\rayanddregs\view_roster.aspx:367
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +115
   System.Web.UI.Page.Render(HtmlTextWriter writer) +38
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4240


Version Information: Microsoft .NET Framework Version:2.0.50727.8974; ASP.NET Version:2.0.50727.8975