Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Zac 223 posts 575 karma points
    Aug 01, 2011 @ 12:54
    Zac
    0

    Error adding to basket after updating to UCommerce v2

    Hi there.

    We've been having another problem since updating to UCommerce2. When adding a product to the basket, I'm seeing errors like this in the log file.

    It's entirely possible I've done something wrong, but I'm having trouble figuring this out.

    could not insert: [UCommerce.EntitiesV2.PurchaseOrder][SQL: INSERT INTO 
    uCommerce_PurchaseOrder (BasketId, OrderNumber, CultureCode, CreatedDate,
    ModifiedOn, CompletedDate, Note, VAT, OrderTotal, Discount, DiscountTotal,
    ShippingTotal, PaymentTotal, TaxTotal, SubTotal, CustomerId, OrderStatusId,
    CurrencyId, ProductCatalogGroupId, BillingAddressId) VALUES
    (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
    select SCOPE_IDENTITY()]
    System.Object PerformInsert(NHibernate.SqlCommand.SqlCommandInfo,
    NHibernate.Engine.ISessionImplementor, NHibernate.Id.Insert.IBinder)
    at NHibernate.Id.Insert.AbstractReturningDelegate.PerformInsert(
    SqlCommandInfo insertSQL, ISessionImplementor session, IBinder binder)
    at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(
    Object[] fields, Object obj, ISessionImplementor session)
    at NHibernate.Action.EntityIdentityInsertAction.Execute()
    at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
    at NHibernate.Event.Default.AbstractSaveEventListener.PerformSaveOrReplicate(
    Object entity, EntityKey key, IEntityPersister persister,
    Boolean useIdentityColumn, Object anything, IEventSource source,
    Boolean requiresImmediateIdAccess)
    at NHibernate.Event.Default.AbstractSaveEventListener.SaveWithGeneratedId(
    Object entity, String entityName, Object anything, IEventSource source,
    Boolean requiresImmediateIdAccess)
    at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.SaveWithGeneratedOrRequestedId(
    SaveOrUpdateEvent event)
    at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.EntityIsTransient(
    SaveOrUpdateEvent event) at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(
    SaveOrUpdateEvent event) at NHibernate.Impl.SessionImpl.FireSaveOrUpdate(
    SaveOrUpdateEvent event) at NHibernate.Impl.SessionImpl.SaveOrUpdate(
    Object obj) at UCommerce.EntitiesV2.Repository`1.Save(T entity)
    at UCommerce.Runtime.OrderContext.CreateBasket(Currency currency)
    at UCommerce.Runtime.OrderContext.GetBasket(Boolean create)
    at UCommerce.Xslt.ClientContext.GetBasket(Boolean create)
    at UCommerce.Xslt.TransactionLibrary.AddToBasket(String catalogName,
    Int32 quantity, String sku, String variantSku, Boolean addToExistingLine)
    at UCommerce.Xslt.TransactionLibrary.AddToBasket(String catalogName,
    Int32 quantity, String sku, String variantSku)
    at UCommerce.Xslt.Library.HandledCall[T](Func`1 method)

    ======

    Invalid column name 'Discount'. Invalid column name 'DiscountTotal'.
    Void OnError(System.Data.SqlClient.SqlException, Boolean)
    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
    Boolean breakConnection)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
    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.System.Data.IDbCommand.ExecuteReader()
    at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd)
    at NHibernate.Id.IdentityGenerator.InsertSelectDelegate.ExecuteAndExtract(
    IDbCommand insert, ISessionImplementor session)
    at NHibernate.Id.Insert.AbstractReturningDelegate.PerformInsert(
    SqlCommandInfo insertSQL, ISessionImplementor session, IBinder binder)

    Many thanks,

    Zac

  • Søren Spelling Lund 1797 posts 2786 karma points
    Aug 02, 2011 @ 11:56
    Søren Spelling Lund
    1

    Hi Zac,

    This line "Invalid column name 'Discount'.  Invalid column name 'DiscountTotal'." tells me that something must have gone awry during the update as a column is missing from the database.

    The SQL user identity that you're using in the Umbraco connection string must have permissions to change the database schema. Could you verify that that is the case?

    Once that's in place please try the update again.

    Thanks.

  • Zac 223 posts 575 karma points
    Aug 02, 2011 @ 12:09
    Zac
    0

    Hi Søren,

    Many thanks for that, nailed it.

    I just re-installed using the sa user, and that's solved everything (including the other problem).

    I had the following roles for the user:

    db_datareader

    db_datawriter

    db_owner

    So I was missing... db_ddladmin right?

  • Søren Spelling Lund 1797 posts 2786 karma points
    Aug 03, 2011 @ 14:21
    Søren Spelling Lund
    0

    Perfect. db_dlladmin should do the trick as well.

Please Sign in or register to post replies

Write your reply to:

Draft