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 2 of 2

Thread: Error Question

  1. #1
    chrismartz is offline Senior Member
    Join Date
    Apr 2010
    Posts
    339

    Default Error Question

    How Can I tell where this error is occurring from the following stack trace?

    Code:
    Page URL:/ADNS/checkoutreview.aspx 
    Source:.Net SqlClient Data Provider 
    Message:There are more columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement. 
    Stack Trace: 
    at AspDotNetStorefrontCore.DB.ExecuteSQL(String Sql) 
    at AspDotNetStorefrontGateways.Gateway.CreateOrderRecord(ShoppingCart cart, Int32 OrderNumber, Address UseBillingAddress) 
    at AspDotNetStorefrontGateways.Gateway.MakeOrder(String PaymentGatewayToUse, String TransactionMode, ShoppingCart cart, Int32 OrderNumber, String CAVV, String ECI, String XID, String RecurringSubscriptionID) 
    at AspDotNetStorefront.checkoutreview.ProcessCheckout() in c:\Inetpub\wwwroot\C#9013\Web\checkoutreview.aspx.cs:line 483 
    at AspDotNetStorefront.checkoutreview.ContinueCheckout() in c:\Inetpub\wwwroot\C#9013\Web\checkoutreview.aspx.cs:line 190 
    at AspDotNetStorefront.checkoutreview.btnContinueCheckout1_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\C#9013\Web\checkoutreview.aspx.cs:line 177 
    at System.EventHandler.Invoke(Object sender, EventArgs e) 
    at System.Web.UI.WebControls.Button.OnClick(EventArgs e) 
    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) 
    at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) 
    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) 
    at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) 
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

  2. #2
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    Hi

    From that stack trace, the last ASPDNSF method call was in the Gateways code, specifically in the CreateOrderRecord() method.

    That's as much as you get from that stack track, however, from looking at the source code, I'd bet that your error is caused at approx. line 480 onwards of Gateway.cs where the SQL 'insert into Orders()' statement is created.

    If you have the source code, a really quick way to debug this would be to add some lines just before the DB.ExecuteSQL(sql.ToString()); statement at line 673 and output the sql string to a file (or send it to screen with a Response.Write). Then, take the contents of the file, and check the statement in SQL Server management studio.

    Goes without saying, don't do this on a live system.

    Adam