Copied to clipboard

Flag this post as spam?

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


  • Paul Blair 466 posts 731 karma points
    Feb 24, 2012 @ 03:51
    Paul Blair
    0

    Limit on number of countries?

    Is there a limit on the number of countries that can be loaded. Upon loading the 110th country I get the following error:

    Exception Details: System.InvalidOperationException: Operation is not valid due to the current state of the object.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [InvalidOperationException: Operation is not valid due to the current state of the object.]
       System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded() +2420258
       System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding) +58
       System.Web.HttpRequest.FillInFormCollection() +159
    
    [HttpException (0x80004005): The URL-encoded form data is not valid.]
       System.Web.HttpRequest.FillInFormCollection() +217
       System.Web.HttpRequest.get_Form() +104
       System.Web.HttpRequest.get_HasForm() +9038047
       System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +97
       System.Web.UI.Page.DeterminePostBackMode() +69
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +13

    I'm loading via a SQL script, but the error occurs whether I load the 110th item through the script or manually through the admin section. My script looks like:

    declare @sh int;
    declare @sort int;

    set @Sh=2;

    INSERT INTO [TeaCommerce_Country]
               ([StandardCurrencyId]
               ,[Name]
               ,[CountryCode]
               ,[IsDefault]
               ,[IsDeleted]
               ,[VATGroupId]
               ,[Sort])
    VALUES
    (@sh, 'Sweden', 'SE', 0, 0, 1, 1),
    (@sh, 'United Kingdom', 'UK', 0, 0, 1, 1), ....

    Thanks

    Paul

  • Anders Burla 2560 posts 8256 karma points
    Feb 24, 2012 @ 08:15
  • Paul Blair 466 posts 731 karma points
    Feb 25, 2012 @ 23:44
    Paul Blair
    0

    nice one. Thanks Anders

Please Sign in or register to post replies

Write your reply to:

Draft