an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > Using DotShoppingCart > Error when Trying to Delete a line on Sales Ord...
Last Post 8/11/2009 12:36:29 PM By bansal_db. 10 replies.
7/22/2009 1:03:05 PM
bansal_db
Posts: 181
Joined: 4/13/2009
Error when Trying to Delete a line on Sales Order
Hey Luke,
 
 
I am getting this error when I try to delete a line on a sales order from the admin window.

Invalid length parameter passed to the LEFT or SUBSTRING function.

  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: Invalid length parameter passed to the LEFT or SUBSTRING function.

Source Error:

<table bgcolor="#ffffcc" width="100%"> <tbody> <tr> <td>
Line 309:                oldIndex++;
Line 310:            } else {
Line 311:                OrderItem.Delete(Order.OrderItems[oldIndex].OrderItemId);
Line 312: sb.AppendFormat((string)HttpContext.GetGlobalResourceObject("Common", "OrderItemEditDeleteItem"), Order.OrderItems[oldIndex].SKU); Line 313: oldIndex++;
</td> </tr> </tbody> </table>
7/22/2009 1:17:44 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Error when Trying to Delete a line on Sales Order
Looks like a bug in store procedure. Any chance you can use SQL Profile and pin point which line of code in the store procedure is causing the issue?
DotShoppingCart Staff
8/6/2009 8:03:59 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: Error when Trying to Delete a line on Sales Order
hey luke,
 
I am getting this error ramdomly. Also the same error shows up when i try to update the price in the order for an item. Again, it doesn't show up for all the orders or for all the line items. It only shows up on some.
 
Any Ideas?
 
Thanks
8/7/2009 2:07:50 PM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: Error when Trying to Delete a line on Sales Order
Hey Luke,
 
Looks like this error shows up for only one product category that has attributes assigned to it. I am not sure what is causing it but i cannot edit line items that have any product with that category.
 
You mentioned to use SQL Profiler but i don't think SQL Profiler is part of the SQL Express.
 
Can you please help with this?
 
Thanks
 
-D
8/7/2009 2:23:00 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Error when Trying to Delete a line on Sales Order
Which category is this? Are you saying you assign attribte to product not category?
DotShoppingCart Staff
8/10/2009 6:46:02 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: Error when Trying to Delete a line on Sales Order
No. I have attributes on product level only but all the products in this category have attributes. It's a required field. I am not sure if that would cause the problem is not but only products in this category are facing this error.
 
 
 
 
 
 
8/10/2009 8:37:45 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Error when Trying to Delete a line on Sales Order
I will investigate this error. Could you please tell me which order# it is?
DotShoppingCart Staff
8/10/2009 8:40:43 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: Error when Trying to Delete a line on Sales Order
 
Its any order which has products from this category.
 
Phones/Page Plus
 
Here is one order
 
order # SD10062
 
Line Item PP LG VX4650
 
 
Thanks
 
 
 
8/11/2009 11:22:08 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: Error when Trying to Delete a line on Sales Order
Luke,
 
Anything on this? I have customers complaining as can't modify their orders.
 
Thanks
8/11/2009 12:33:02 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Error when Trying to Delete a line on Sales Order
It's a bug in sproc DSC_Product_UpdateQuantity. It should be fixed now. Please try it again.
DotShoppingCart Staff
8/11/2009 12:36:29 PM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: Error when Trying to Delete a line on Sales Order
Ya it works now. Thanks for the help.