Server Error in '/' Application.

Ambiguous column name 'views'.

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: Ambiguous column name 'views'.

Source Error:


Line 1057:        
Line 1058:        SqlCommand Photos_cmd = new SqlCommand(str.ToString(), con);
Line 1059:        SqlDataReader reader = Photos_cmd.ExecuteReader(CommandBehavior.CloseConnection);
Line 1060:        while (reader.Read())
Line 1061:        {

Source File: g:\Web\HussainiatVideo\App_Code\BLLC\VideoBLL.cs    Line: 1059

Stack Trace:


[SqlException (0x80131904): Ambiguous column name 'views'.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1968874
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4907547
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2412
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +59
   System.Data.SqlClient.SqlDataReader.get_MetaData() +83
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +293
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +70
   VideoBLL.Fetch_Videos_Limit(String term, Int32 CategoryID, Int32 isFeatured, Int32 isAudio, String UserName, Int32 Month, Int32 Year, Int32 Filter, Int32 isEnabled, Int32 isApproved, Int32 isPrivate, Int32 isAdult, Int32 isExternal, String order, Int32 records, Int32 datefilter, Int32 SearchType, Int32 PageNumber, Int64 AlbumID) in g:\Web\HussainiatVideo\App_Code\BLLC\VideoBLL.cs:1059
   VideoBLL.Load_Videos_Limit(String term, Int32 CategoryID, Int32 isFeatured, Int32 isAudio, String UserName, Int32 Month, Int32 Year, Int32 Filter, Int32 isEnabled, Int32 isApproved, Int32 isPrivate, Int32 isAdult, Int32 isExternal, String order, Int32 records, Int32 SearchType, Int32 datefilter, Boolean iscache, Int32 PageNumber, Int64 AlbumID) in g:\Web\HussainiatVideo\App_Code\BLLC\VideoBLL.cs:979
   videos_modules_vd_sm.BindList() in g:\Web\HussainiatVideo\videos\modules\vd_sm.ascx.cs:145
   videos_modules_vd_sm.Page_PreRender(Object sender, EventArgs e) in g:\Web\HussainiatVideo\videos\modules\vd_sm.ascx.cs:127
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnPreRender(EventArgs e) +8788966
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842


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