error on bulk edit

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Cannot insert the value NULL into column 'ProductVariantID', table 'tempdb.dbo.#PageIndex__________________________________________________________________________________________________________000000000157'; column does not allow nulls. INSERT fails.
The statement has been terminated.


this is an upgrade with a lot of products 1.5 to 1.6

thanks
13 years ago
Could you post your full error text? Admin area > System > Log
13 years ago
Thanks this is the only issue I have running herehttp://www.fabfourstore.com

Although how come we cant update the Stock Quantity on this page. LOVE THE NEW FEATURE





Unknown  
Severity:  11  
Message:  Exception of type 'System.Web.HttpUnhandledException' was thrown.  
Exception:  System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'ProductVariantID', table 'tempdb.dbo.#PageIndex__________________________________________________________________________________________________________00000000000C'; column does not allow nulls. INSERT fails. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.SetMetaData(_SqlMetaDataSet metaData, Boolean moreInfo) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoExecuteReader(DbCommand command, CommandBehavior cmdBehavior) at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DbCommand command) at NopSolutions.NopCommerce.DataAccess.Products.SqlProductProvider.GetAllProductVariants(Int32 categoryId, Int32 manufacturerId, String keywords, Boolean showHidden, Int32 pageSize, Int32 pageIndex, Int32& totalRecords) in C:\inetpub\wwwroot\_store1.6\Libraries\Nop.DataAccess.SqlServer\Products\SqlProductProvider.cs:line 661 at NopSolutions.NopCommerce.BusinessLogic.Products.ProductManager.GetAllProductVariants(Int32 categoryId, Int32 manufacturerId, String keywords, Int32 pageSize, Int32 pageIndex, Int32& totalRecords) in C:\inetpub\wwwroot\_store1.6\Libraries\Nop.BusinessLogic\Products\ProductManager.cs:line 1819 at NopSolutions.NopCommerce.Web.Administration.Modules.BulkEditProductsControl.GetProductVariants() in C:\inetpub\wwwroot\_store1.6\NopCommerceStore\Administration\Modules\BulkEditProducts.ascx.cs:line 90 at NopSolutions.NopCommerce.Web.Administration.Modules.BulkEditProductsControl.BindGrid() in C:\inetpub\wwwroot\_store1.6\NopCommerceStore\Administration\Modules\BulkEditProducts.ascx.cs:line 97 at NopSolutions.NopCommerce.Web.Administration.Modules.BulkEditProductsControl.Page_Load(Object sender, EventArgs e) in C:\inetpub\wwwroot\_store1.6\NopCommerceStore\Administration\Modules\BulkEditProducts.ascx.cs:line 48 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()  
IP address:  127.0.0.1  
Customer:  [email protected]  
Page URL:  http://localhost:1675/administration/bulkeditproducts.aspx  
Referrer:  http://localhost:1675/administration/logs.aspx  
Created on:  6/4/2010 7:47:15 AM
13 years ago
Me too

Server Error in '/' Application.
--------------------------------------------------------------------------------

Cannot insert the value NULL into column 'ProductVariantID', table 'tempdb.dbo.#PageIndex__________________________________________________________________________________________________________000000000010'; column does not allow nulls. INSERT fails.
The statement has been terminated.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'ProductVariantID', table 'tempdb.dbo.#PageIndex__________________________________________________________________________________________________________000000000010'; column does not allow nulls. INSERT fails.
The statement has been terminated.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[SqlException (0x80131904): Cannot insert the value NULL into column 'ProductVariantID', table 'tempdb.dbo.#PageIndex__________________________________________________________________________________________________________000000000010'; column does not allow nulls. INSERT fails.
The statement has been terminated.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1948826
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4844747
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
   System.Data.SqlClient.SqlDataReader.SetMetaData(_SqlMetaDataSet metaData, Boolean moreInfo) +125
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1908
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
   System.Data.SqlClient.SqlDataReader.get_MetaData() +83
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
   System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) +10
   Microsoft.Practices.EnterpriseLibrary.Data.Database.DoExecuteReader(DbCommand command, CommandBehavior cmdBehavior) +223
   Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DbCommand command) +244
   NopSolutions.NopCommerce.DataAccess.Products.SqlProductProvider.GetAllProductVariants(Int32 categoryId, Int32 manufacturerId, String keywords, Boolean showHidden, Int32 pageSize, Int32 pageIndex, Int32& totalRecords) in S:\CIS-@MainData\Websites\nopCommerce_1.60\Libraries\Nop.DataAccess.SqlServer\Products\SqlProductProvider.cs:661
   NopSolutions.NopCommerce.BusinessLogic.Products.ProductManager.GetAllProductVariants(Int32 categoryId, Int32 manufacturerId, String keywords, Int32 pageSize, Int32 pageIndex, Int32& totalRecords) in S:\CIS-@MainData\Websites\nopCommerce_1.60\Libraries\Nop.BusinessLogic\Products\ProductManager.cs:1819
   NopSolutions.NopCommerce.Web.Administration.Modules.BulkEditProductsControl.GetProductVariants() in S:\CIS-@MainData\Websites\nopCommerce_1.60\NopCommerceStore\Administration\Modules\BulkEditProducts.ascx.cs:89
   NopSolutions.NopCommerce.Web.Administration.Modules.BulkEditProductsControl.BindGrid() in S:\CIS-@MainData\Websites\nopCommerce_1.60\NopCommerceStore\Administration\Modules\BulkEditProducts.ascx.cs:97
   NopSolutions.NopCommerce.Web.Administration.Modules.BulkEditProductsControl.Page_Load(Object sender, EventArgs e) in S:\CIS-@MainData\Websites\nopCommerce_1.60\NopCommerceStore\Administration\Modules\BulkEditProducts.ascx.cs:48
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
13 years ago
Me too... the error seems to be near line 76 of Nop_ProductVariantLoadAll

When I run
SELECT DISTINCT pv.ProductVariantID
  FROM Nop_Product p with (NOLOCK)
  LEFT OUTER JOIN Nop_Product_Category_Mapping pcm with (NOLOCK) ON p.ProductID=pcm.ProductID
  LEFT OUTER JOIN Nop_Product_Manufacturer_Mapping pmm with (NOLOCK) ON p.ProductID=pmm.ProductID
  LEFT OUTER JOIN Nop_ProductVariant pv with (NOLOCK) ON p.ProductID = pv.ProductID

the first row returned is a null
13 years ago
I'm running v1.6 on a local machine only (using IE8)  and I cannot replicate the error - it seem to be working fine for me - where is everyone else running v1.6 finding the problem - on a local machine or on a server - which browser?

EDIT
okay, i tried it now on my shared hosting account - with an upgraded database - still using ie8 and works without error
13 years ago
I'm running 1.6 on a local machine also, using Firefox 3.6.  Just for fun, I ran it against a new and unmodified v1.6 database with the sample data, and it ran fine.
13 years ago
@ haddie

multi locations, multi browsers.

Its real!!!!!
13 years ago
OK, I fixed it on my system.  I had Nop_Product rows without corresponding Nop_ProductVariant.  So I deleted the Nop_Product rows that didn't exist in Nop_ProductVariant.  I did try it in a test database before my pre-production database. :)

It was kludgy, but it worked....
13 years ago
'
garethjnic - thanks for the pm

garethjnic wrote:

From:  garethjnic  
To:  haydie  
Subject:  I knoiw you like the hits  
Message:  but most of your answers are BS...  


thanks for taking the time to criticise

just so you know - i couldn't give a shit about the hits, I'm not the immature, shallow kind of person who thinks in those terms. I'm just trying to help others get the most out of nop. Everyones feedback is important.

As far as I'm concerned all of us are using nop to try and make a success of one business or another so the success of nop works in all our favour - why don't you put some of your efforts into answering questions on the forum instead of sending pm's critisising those of us who give their own personal time to try and help out ?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.