HomeHome Product Discus... Product Discus...Payment Registr...Payment Registr...Delete Payment Entry Broken - v. 3.35Delete Payment Entry Broken - v. 3.35
Previous
 
Next
New Post
4/7/2011 8:26 AM
 

When deleting a customer entry in the Manage Subscriptions module with version 3.35 it gives me this error-

Unable to cast object of type 'System.DBNull' to type 'System.String'.

I noticed the stored procedure Smith_DeletePayHist is only deleting the Smith_RegPayHist table entry, and not the corresponding customer entry.

I believe the reason for the error is a null entry being created by the stored procedure in the Smith_RegPayHist table when deleting an entry.

Do you have a fix for this?

 
New Post
4/7/2011 12:51 PM
 
On the customer payments/manage subscription screen when you click delete is calls the following 2 stored procs:

1. Smith_DeleteSubscription
2. Smith_DeletePayHist

So its deletes the subscription record and the payment history record but not the customer. The reason is that the customer may have other payment/subscription records out there and if we deleted the customer also it would orphan other payment records for that customer. Also if a customer has registered on your portal and created a profile you want to retain their profile info in case they return to the site and login and want to buy something again all their info will automatically be populated on the registration form.

-Scott

Scott Kelly
Project Manager
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
4/7/2011 1:22 PM
 

So why the error

Unable to cast object of type 'System.DBNull' to type 'System.String'.

when access the Manage Subscription screen?

 
New Post
4/7/2011 4:38 PM
 
Are the records your trying to delete subscriptions or one time payments? I dont get the error on my test portal. Can you post the error from the dnn event viewer?

-Scott

Scott Kelly
Project Manager
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
4/8/2011 6:14 AM
 

I am deleting a one time payment. We don't do subscriptions.

Here is the error:

UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 397f9cfd-6b1a-4c87-8344-22def60f7cac
InnerException: Unable to cast object of type 'System.DBNull' to type 'System.String'.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: ASP.desktopmodules_smithregadminmenu_managesubscription1_ascx.__DataBinding__control85
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_smithregadminmenu_managesubscription1_ascx.__DataBinding__control85(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.DataGrid.CreateItem(Int32 itemIndex, Int32 dataSourceIndex, ListItemType itemType, Boolean dataBind, Object dataItem, DataGridColumn[] columns, TableRowCollection rows, PagedDataSource pagedDataSource) at System.Web.UI.WebControls.DataGrid.CreateControlHierarchy(Boolean useDataSource) at System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) at Smith.DNN.Modules.Registration.ManageSubscription1.BindData() at Smith.DNN.Modules.Registration.ManageSubscription1.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 ---

 
New Post
4/12/2011 5:20 PM
 
I just emailed you a hotfix for you to try with deployment instructions. Let me know if it works for you.

Thanks,
Scott

Scott Kelly
Project Manager
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
Previous
 
Next
HomeHome Product Discus... Product Discus...Payment Registr...Payment Registr...Delete Payment Entry Broken - v. 3.35Delete Payment Entry Broken - v. 3.35