HomeHome Product Discus... Product Discus...SmithCartSmithCartOrder and OrderDetails DataOrder and OrderDetails Data
Previous
 
Next
New Post
8/10/2010 9:53 AM
 

While looking at something else, I discovered that when an order has been deleted, the order detail has been left behind as a orphan.

This results in data integrity issues with adhoc reporting outside of SmithCart.

Seems like refential integrity is not being maintained between the Smith_StoreOrders and the Smith_StoreOrderDetails table.

 
New Post
8/10/2010 4:04 PM
 

I was able to confirm this is true but it shouldnt matter too much since most of your adhoc reporting should be joining the order and orderdetails tables to get meaningful data. In your adhoc query if you join the order and order detail tables it would not return any of the orphan records in the order detail table. In any event, we have updated the stored procedure "Smith_DeleteStoreOrders" to delete the records from the order details table then delete the order when you delete an order from the manage orders screen in the cart admin. If you would like to make the change with upgrading your cart please run the following stored procedure in query analyzer but make sure you use your objectqualifier if you have one:

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[dnn_Smith_DeleteStoreOrders]
@OrderID int
AS

BEGIN

DELETE FROM dnn_Smith_StoreOrderDetails
WHERE [OrderID] = @OrderID

DELETE FROM dnn_Smith_StoreOrders
WHERE [OrderID] = @OrderID

END

GO

This updated sproc will be included in cart v3.02 beta release tomorrow.

-Scott


Scott Kelly
Project Manager
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
8/11/2010 9:01 AM
 

Thanks Scott, you folks certainly provide fantastic support!

 
Previous
 
Next
HomeHome Product Discus... Product Discus...SmithCartSmithCartOrder and OrderDetails DataOrder and OrderDetails Data