HomeHome Product Discus... Product Discus...SmithCartSmithCartInvalid Columns error when importing Smith CartInvalid Columns error when importing Smith Cart
Previous
 
Next
New Post
3/11/2011 9:31 AM
 

I'm trying to migrate SmithCart to a new swimlane for testing. I did a fresh install of Smith_Cart on a new instance of DNN using SmithCart421Trial-DNN5. Whenever I try to export the database from this instance and import into another database I get the error below:

Msg 207, Level 16, State 1, Procedure Smith_DeleteShoppingCartBundle, Line 10

Invalid column name 'BundleID'.

Msg 207, Level 16, State 1, Procedure Smith_DeleteShoppingCartBundle, Line 10

Invalid column name 'MasterBundleID'.

Msg 207, Level 16, State 1, Procedure Smith_DeleteDuplicateShoppingCartBundle, Line 9

Invalid column name 'BundleID'.

Looking at the Stored Procedure, it's looking for the BundleID in the Smith_ShoppingCart table:

CREATE PROCEDURE [dbo].[Smith_DeleteShoppingCartBundle]

(

@bundleID int,

@masterBundleID int

)

AS

BEGIN

DELETE FROM Smith_ShoppingCart

WHERE [BundleID] = @bundleID AND [MasterBundleID] = @masterBundleID

END

GO

I don't show a column called BundleID or MasterBundleID in the Smith_ShoppingCart table. Was something not created when I did my new install?

Thanks for the help.

 
New Post
3/11/2011 3:17 PM
 

I've got some additional information here. I looked through the SQLDataProvider files in the package and noticed that the Smith_ShoppingCart table dropped and recreated with fewer columns in 04.01.00, but there are still references to deleted columns in a couple stored procedures.

Here's the original Smith_ShoppingCart creation in 01.00.00:

if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}{objectQualifier}Smith_ShoppingCart'))

drop table {databaseOwner}{objectQualifier}Smith_ShoppingCart

GO

CREATE TABLE {databaseOwner}[{objectQualifier}Smith_ShoppingCart](

[CartID] [int] IDENTITY(1,1) NOT NULL,

[ProductID] [int] NOT NULL,

[Manufacturer] [varchar](50) NULL,

[ModelName] [varchar](50) NULL,

[UnitCost] [decimal](18, 0) NULL,

[QuantityOnHand] [int] NULL,

[Quantity] [int] NULL,

[Weight] [decimal](18, 0) NULL,

[ProductName] [varchar](50) NULL,

[ProductSku] [varchar](50) NULL,

[IsRequired] [bit] NULL,

[BundleID] [int] NULL,

[AddDnnRole] [varchar](50) NULL,

[Recurring] [bit] NULL,

[RequireLogin] [bit] NULL,

[UsePriPriceWght] [bit] NULL,

[MasterBundleID] [int] NULL,

[LineItem] [int] NULL,

[RoleExpireDays] [varchar](50) NULL,

[MemberPrice] [decimal](18, 0) NULL,

[TaxExempt] [bit] NULL,

[ShipCodes] [varchar](100) NULL,

[ShipText] [nvarchar](500) NULL,

[ShipCost] [money] NULL,

CONSTRAINT [PK_Smith_ShoppingCart_1] PRIMARY KEY CLUSTERED

(

[CartID] ASC

)

)

GO

Here is the drop and create of the Smith_ShoppingCart table in 04.01.00:

if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}{objectQualifier}Smith_ShoppingCart'))

drop table {databaseOwner}{objectQualifier}Smith_ShoppingCart

GO

CREATE TABLE {databaseOwner}[{objectQualifier}Smith_ShoppingCart](

[CartID] [int] IDENTITY(1,1) NOT NULL,

[ProductID] [int] NOT NULL,

[Quantity] [decimal](10, 2) NULL,

[ProductName] [varchar](255) NULL,

[CartCookie] [varchar](30) NULL,

[IsRequired] [bit] NULL,

CONSTRAINT [PK_Smith_ShoppingCart_1] PRIMARY KEY CLUSTERED

(

[CartID] ASC

)

)

GO

Here are the two stored procedures referencing columns that no longer exist:

Created in 01.00.00

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'{databaseOwner}{objectQualifier}Smith_DeleteShoppingCartBundle'))

drop procedure {databaseOwner}{objectQualifier}Smith_DeleteShoppingCartBundle

GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}Smith_DeleteShoppingCartBundle

(

@bundleID int,

@masterBundleID int

)

AS

BEGIN

DELETE FROM {objectQualifier}Smith_ShoppingCart

WHERE [BundleID] = @bundleID AND [MasterBundleID] = @masterBundleID

END

GO

Created in 01.00.02

if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}{objectQualifier}Smith_DeleteDuplicateShoppingCartBundle')) drop procedure {databaseOwner}{objectQualifier}Smith_DeleteDuplicateShoppingCartBundle

GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}Smith_DeleteDuplicateShoppingCartBundle

(

@bundleID int,

@cartID int

)

AS

BEGIN

DELETE FROM {objectQualifier}Smith_ShoppingCart

WHERE [BundleID] = @bundleID AND CARTID = @cartID

END

GO

Both of these procedures are very old and I'm guessing they're depricated. Can anyone confirm if these are still needed? Can I delete them without problem?

 
New Post
3/13/2011 12:18 AM
Accepted Answer 

Which version of the cart are you upgrading from? There's no refrence to Smith_DeleteDuplicateShoppingCartBundle in the current build of the cart there are no refrences to "Smith_DeleteDuplicateShoppingCartBundle".

Thanks,

Christian

 
New Post
5/9/2011 1:28 PM
 

This is not an upgrade.  It's a fresh install.

 
Previous
 
Next
HomeHome Product Discus... Product Discus...SmithCartSmithCartInvalid Columns error when importing Smith CartInvalid Columns error when importing Smith Cart