Console app can select data but not update

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Apologies if this is in the wrong forum.

I am having a small problem with a console app I am writing.

The problem is that I can select data using the different nopcommerce libraries (i.e OrderManager, CustomerManager etc).  While I can select, none of the update, delete or create statements seem to succeed.  Must I have an admin user logged in through code or something to accomplish this?  Any guidance would be greatly appreciated. Thanks

I start my program like this:
static void Main(string[] args)
        {

            // Initialise NOP
            NopSolutions.NopCommerce.BusinessLogic.Configuration.NopConfig.Init();


my app.config file has this:
<configSections>
    <section name="NopConfig" type="NopSolutions.NopCommerce.BusinessLogic.Configuration.NopConfig, Nop.BusinessLogic" requirePermission="false"/>
  </configSections>
  <connectionStrings>
    <add name="NopSqlConnection" connectionString="****" />
  </connectionStrings>
  <NopConfig>
    <SqlServer ConnectionStringName="NopSqlConnection"/>
    <ScheduleTasks>
      <Thread seconds="60">
        <!--do NOT enable ClearCache task if you have enabled tracking online users-->
        <task name="ClearCache" type="NopSolutions.NopCommerce.BusinessLogic.Caching.ClearCacheTask, Nop.BusinessLogic" enabled="false" stopOnError="false"/>
        <task name="PurgeOnlineUsers" type="NopSolutions.NopCommerce.BusinessLogic.Audit.UsersOnline.PurgeOnlineUsersTask, Nop.BusinessLogic" enabled="true" stopOnError="false"/>
        <task name="Emails" type="NopSolutions.NopCommerce.BusinessLogic.Messages.SendQueuedMessagesTask, Nop.BusinessLogic" enabled="true" stopOnError="false" maxTries="5"/>
        <task name="KeepAlive" type="NopSolutions.NopCommerce.BusinessLogic.Utils.KeepAliveTask, Nop.BusinessLogic" enabled="true" stopOnError="false" path="keepalive/ping.ashx"/>
      </Thread>
      <Thread seconds="600">
        <task name="DeleteExpiredCustomerSessions" type="NopSolutions.NopCommerce.BusinessLogic.CustomerManagement.DeleteExpiredCustomerSessionsTask, Nop.BusinessLogic" enabled="true" stopOnError="false" deleteExpiredCustomerSessionsOlderThanMinutes="43200"/>
        <task name="DeleteExpiredShoppingCarts" type="NopSolutions.NopCommerce.BusinessLogic.Orders.DeleteExpiredShoppingCartsTask, Nop.BusinessLogic" enabled="true" stopOnError="false" deleteExpiredShoppingCartsOlderThanMinutes="259200"/>
      </Thread>
      <Thread seconds="60">
        <task name="UpdateExchangeRates" type="NopSolutions.NopCommerce.BusinessLogic.Directory.ExchangeRates.UpdateExchangeRateTask, Nop.BusinessLogic" enabled="true" stopOnError="false"/>
      </Thread>
      <Thread seconds="3600">
        <task name="DatabaseMaintance" type="NopSolutions.NopCommerce.BusinessLogic.Maintenance.DatabaseMaintanceTask, Nop.BusinessLogic" enabled="false" stopOnError="false"/>
      </Thread>
    </ScheduleTasks>
  </NopConfig>
13 years ago
Its not the end of the world, I can create my own data model to alter the data directly.  Just seems like a shame as all the functionality is already in the nopcommerce libraries.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.