Already tried that...doesn't work.
Here's the error if I change this (first insert statement):
SELECT @SearchSQL ='INSERT INTO #TempItems (PayHistID) '+
' select Smith_RegPayHist.PayHistID '+
' from Smith_RegCustomer inner join Smith_RegPayHist '+
' on Smith_RegCustomer.CustomerID=Smith_RegPayHist.CustomerID '+
' inner join Smith_Subscription '+
' on Smith_RegPayHist.CustomerID=Smith_Subscription.CustomerID '
to this:
SELECT @SearchSQL ='INSERT INTO #TempItems (PayHistID) '+
' select Smith_RegPayHist.PayHistID '+
' from Smith_RegCustomer inner join Smith_RegPayHist '+
' on Smith_RegCustomer.CustomerID=Smith_RegPayHist.CustomerID '+
' left outer join Smith_Subscription '+
' on Smith_RegPayHist.CustomerID=Smith_Subscription.CustomerID '
UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 09bf03f9-afd2-48e3-ae9a-a916aa527638
InnerException: String was not recognized as a valid DateTime.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.DateTimeParse.Parse
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: String was not recognized as a valid DateTime. ---> System.FormatException: String was not recognized as a valid DateTime. at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at System.Convert.ToDateTime(String value) at Smith.DNN.Modules.Registration.ViewSubscriptionHistory.loadDate(Object str) at ASP.desktopmodules_smithregistrationmanagesub_viewsubscriptionhistory_ascx.__DataBinding__control31(Object sender, EventArgs e) at System.Web.UI.Control.OnDataBinding(EventArgs e) at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource) at System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) at System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data) at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) at System.Web.UI.WebControls.DataBoundControl.PerformSelect() at Smith.DNN.Modules.Registration.ViewSubscriptionHistory.BindgrdViewSubscriptions() at Smith.DNN.Modules.Registration.ViewSubscriptionHistory.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
Source:
Server Name: LATITUDE
Here's the error if I change the second insert statement:
AbsoluteURLReferrer:
UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: c095ceb3-f9b1-4b41-884c-ab773e9fc622
InnerException: Unable to cast object of type 'System.DBNull' to type 'System.String'.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: ASP.desktopmodules_smithregistrationmanagesub_viewsubscriptionhistory_ascx.__DataBinding__control25
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Unable to cast object of type 'System.DBNull' to type 'System.String'. ---> System.InvalidCastException: Unable to cast object of type 'System.DBNull' to type 'System.String'. at ASP.desktopmodules_smithregistrationmanagesub_viewsubscriptionhistory_ascx.__DataBinding__control25(Object sender, EventArgs e) at System.Web.UI.Control.OnDataBinding(EventArgs e) at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource) at System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) at System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data) at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) at System.Web.UI.WebControls.DataBoundControl.PerformSelect() at Smith.DNN.Modules.Registration.ViewSubscriptionHistory.BindgrdViewSubscriptions() at Smith.DNN.Modules.Registration.ViewSubscriptionHistory.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
Source:
Server Name: LATITUDE