Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Incorrect syntax near ')'.

  1. #1
    kevanbulmer is offline Junior Member
    Join Date
    Jun 2009
    Posts
    20

    Default Incorrect syntax near ')'.

    all of a sudden i am getting this error (on every page)

    Incorrect syntax near ')'.

    Source File: c:\inetpub\wwwroot\mysite\usercontrols\basket.ascx .cs Line: 28


    Line 26: NumItems = AspDotNetStorefrontCore.ShoppingCart.NumItems(Cust omer.CustomerID, CartTypeEnum.ShoppingCart);
    Line 27:
    Line 28: ShoppingCart cart = new ShoppingCart(SkinID, Customer, CartTypeEnum.ShoppingCart, 0, false);
    Line 29: TotalCost = Customer.CurrencyString(cart.SubTotal(true, false, true, true));
    Line 30:

    no code has been modified at all
    Last edited by kevanbulmer; 11-24-2009 at 04:27 AM.

  2. #2
    kevanbulmer is offline Junior Member
    Join Date
    Jun 2009
    Posts
    20

    Default Incorrect syntax near ')'.

    i've just changed the connection string to point to our staging database & now the error has gone.

    So this tells me there is some data, somewhere causing some SQL to fall over, not good!

  3. #3
    Dusty is offline Member
    Join Date
    Jun 2009
    Posts
    176

    Default

    'Incorrect syntax near' is a SQLException, the easiest way to debug would be to run a trace against your database to determine where the exception's coming from. Given that it takes place on one of your database instances and not another the problem is likely related to dynamically generated SQL in which you have an object in which a value is expected but no is to be had, hence causing the syntax exception.

    Dusty
    ASPDotNetStorefront Staff