none
Data model (RPC limitations)

    Question

  • I have problems when Update() SPListItem with a lot of Terms assigned to TaxonomyFields.

    In the case when total number of terms assigned to the TaxonomyFields more then 250 I get an exception:

     

    ExceptionMessage: 'The URL filepath.docx' is invalid.  It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.'   StackTrace: '   

     at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)     

     at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)     

     at Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean bAdd, Boolean bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean bMigration, Boolean bPublish, Boolean bCheckOut, Boolean bCheckin, Guid newGuidOnAdd, Int32& ulID, Object& objAttachmentNames, Object& objAttachmentContents, Boolean suppressAfterEvents, String filename)     

     at Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents, String filename)      

     at Microsoft.SharePoint.SPListItem.SystemUpdate(Boolean incrementListItemVersion)     

    -----   Inner exception:   ------------------------------------------------------------   

    ExceptionType: 'COMException'    ExceptionMessage: '<nativehr>0x81020030</nativehr><nativestack></nativestack>The URL filepath.docx' is invalid.  It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.'    StackTrace: ' 

     at Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)      

     at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)'    Source: ''    TargetSite: 'Void AddOrUpdateItem(System.String, System.String, Boolean, Boolean, Boolean, Boolean, Int32 ByRef, System.String ByRef, System.Guid, Boolean, System.String, System.Object ByRef, System.Object ByRef, System.Object ByRef, Boolean, Boolean, Boolean, Boolean, System.String, Microsoft.SharePoint.Library.ISP2DSafeArrayWriter, Microsoft.SharePoint.Library.ISP2DSafeArrayWriter, Microsoft.SharePoint.Library.ISP2DSafeArrayWriter)'

     

    In the ULS log I found more information about the error:

               

    System.Data.SqlClient.SqlException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.   

     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)   

     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)   

     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.ExecuteReader(CommandBehavior behavior)   

     at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock)   

     at Microsoft.SharePoint.SPSqlClient.ExecuteQueryInternal(Boolean retryfordeadlock)   

     at Microsoft.SharePoint.SPSqlClient.ExecuteQuery(Boolean retryfordeadlock)

     

    According “Maximum Capacity Specifications for SQL Server” it is hardcoded limitation (http://msdn.microsoft.com/en-us/library/ms143432.aspx)

     

    It appears this is due to the fact that during the upgrade in the SQL Server are sent all the data about the item.
    How to get around this problem and save a lot of information on the item?

    A bit more information about issue:

    http://kellydjones.com/archive/2011/05/22/145485.aspx

    • Moved by Mike Walsh FIN Saturday, July 23, 2011 1:33 PM I am advised that this is not a pre-SP 2010 question (From:SharePoint - Development and Programming (pre-SharePoint 2010))
    • Edited by Sergey Tihon Tuesday, July 26, 2011 5:54 PM Additional information
    Thursday, July 21, 2011 2:46 PM

All replies