Invalid object name 'dbo.Nop_CustomerRole'. Error in many tasks

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 12 años
Hi all,

I installed nopCommerce(v. 1.9) via GoDaddy's application install.  No problems - it created the Data base just fine.  I navigated to the admin screen, logged in just fine, but I keep getting the error

Invalid object name 'dbo.Nop_CustomerRole'. - on many task.  

I get this error under "categorie's > add new
I get this error under products - product varients - it says "unnamed" and is clickable - I click it, and get this error.  

It just keeps popping up on random tasks.  

Please help - I need to get this setup, but am frustrated at this point.  It seems to be partially working.
Hace 12 años
i am having the same problem. now my site says Invalid object name 'dbo.Nop_CustomerRole'.
HELPPP!!!
Hace 12 años
I was able to fix it by running the database script that creates the table Nop_CustomerRole, and all other commands regarding that table.

There are 2 files you need to look into. One creates the databases, the other inserts the initial data.

On the first file, you copy all statements that include the table name above, then copy the script from the second file to insert the row in that table right after the table creation. Execute your script and enjoy.

Here's the script.

CREATE TABLE [dbo].[Nop_CustomerRole](
[CustomerRoleID] [int] IDENTITY(1,1) NOT NULL,
[Name] [nvarchar](255) NOT NULL,
[FreeShipping] [bit] NOT NULL,
[TaxExempt] [bit] NOT NULL,
[Active] [bit] NOT NULL,
[Deleted] [bit] NOT NULL,
CONSTRAINT [PK_Nop_CustomerRole] PRIMARY KEY CLUSTERED
(
[CustomerRoleID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 80) ON [PRIMARY]

) ON [PRIMARY]
GO

SET IDENTITY_INSERT [dbo].[Nop_CustomerRole] ON

INSERT [dbo].[Nop_CustomerRole] ([CustomerRoleID], [Name], [FreeShipping], [TaxExempt], [Active], [Deleted]) VALUES (1, N'Global Administrators', 0, 0, 1, 0)

INSERT [dbo].[Nop_CustomerRole] ([CustomerRoleID], [Name], [FreeShipping], [TaxExempt], [Active], [Deleted]) VALUES (2, N'Staff', 0, 0, 1, 0)

INSERT [dbo].[Nop_CustomerRole] ([CustomerRoleID], [Name], [FreeShipping], [TaxExempt], [Active], [Deleted]) VALUES (3, N'Favorite Customers', 0, 0, 1, 0)

INSERT [dbo].[Nop_CustomerRole] ([CustomerRoleID], [Name], [FreeShipping], [TaxExempt], [Active], [Deleted]) VALUES (4, N'Content Managers', 0, 0, 1, 0)

SET IDENTITY_INSERT [dbo].[Nop_CustomerRole] OFF
GO

ALTER TABLE [dbo].[Nop_ACL] CHECK CONSTRAINT [FK_Nop_ACL_Nop_CustomerRole]
GO

ALTER TABLE [dbo].[Nop_ACLPerObject] CHECK CONSTRAINT [FK_Nop_ACLPerObject_Nop_CustomerRole]
GO

ALTER TABLE [dbo].[Nop_Customer_CustomerRole_Mapping] CHECK CONSTRAINT [FK_Nop_Customer_CustomerRole_Mapping_Nop_CustomerRole]
GO

ALTER TABLE [dbo].[Nop_CustomerRole_Discount_Mapping] CHECK CONSTRAINT [FK_Nop_CustomerRole_Discount_Mapping_Nop_CustomerRole]
GO

ALTER TABLE [dbo].[Nop_CustomerRole_Discount_Mapping] CHECK CONSTRAINT [FK_Nop_CustomerRole_Discount_Mapping_Nop_Discount]
GO

ALTER TABLE [dbo].[Nop_CustomerRole_ProductPrice] CHECK CONSTRAINT [FK_Nop_CustomerRole_ProductPrice_Nop_CustomerRole]
GO

ALTER TABLE [dbo].[Nop_CustomerRole_ProductPrice] CHECK CONSTRAINT [FK_Nop_CustomerRole_ProductPrice_Nop_ProductVariant]
GO
Hace 12 años
hi

im trying to do what you are saying but i am a little bit novice

could you eplain a little bit more about how to do that please?

im frustrated about this error too and would like to solve it

thanks
Hace 12 años
set all dir read and write Access permission.I also use godaddy host.
Hace 12 años
lilyluludesign wrote:
set all dir read and write Access permission.I also use godaddy host,It's Ok.
Hace 12 años
ok i did it but what about the script??

do i just have to copy the script in the file Nop_customerrole???

i have hard time to understand what to do exactly in the database with those 2 files?

let me know thanks
Hace 12 años
did anyone figure this out?
Hace 12 años
The script returned about 10 syntax errors for me. However, using the godaddy SQL Server admin tool I was able to manually create the table. Interestingly enough, once the table was created the 4 default customer role types populated without any interference on my part and the errors stopped.
Hace 12 años
Can you give a bit more step by step information on how you were able to get this error fixed. I am not 100% familiar with scripts but can follow the steps well.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.