.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

'Unspecified error' doing sp_xml_preparedocument on XML element with a long attribute

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :Sql Server
In SQL Management Studio 2008 (connected to SQL 2005 database), I get this:The XML parse error 0x80004005 occurred on line number 2, near the XML text "<item value="&#xD;&#xA;libname...Msg 6602, Level 16, State 2, Procedure sp_xml_preparedocument, Line 1The error description is 'Unspecified error'.When I do this declare @doc nvarchar(max), @idoc int set @doc = '<item value="&#xD;&#xA;libname..." />' EXEC sp_xml_preparedocument @idoc OUTPUT, @doc when the value of the @value attribute is actually a string of somewhat over 830000 characters.If I truncate the string somewhat, the statements execute successfully.Anyone know how to fix this?  (and "use shorter attributes" is not an acceptable answer :-)I would use XQuery except that I can't figure out how to get the equivalent of @mp:id and @mpparentid to give me the hierarchical structure information I need.  If anyone knows how to do that, I'd appreciate a hand there too!  

View Complete Post

More Related Resource Links

XML Signature xsd and Validation Error: Wildcard '##any' allows element causes the content model t

Hello,I'm trying to generate WCF client from Customer's WCF Service which has XML Signature options enabled.When trying to generate client proxy using svcutil I get following errors: Microsoft (R) Service Model Metadata Tool [Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152] Copyright (c) Microsoft Corporation. All rights reserved. Attempting to download metadata from 'http://donex:51343/WebServices /Service.svc' using WS-Metadata Exchange or DISCO. Error: There was a validation error on a schema generated during export: Source: Line: 1 Column: 13464 Validation Error: Wildcard '##any' allows element 'http://www.w3.org/2000/09/ xmldsig#:HMACOutputLength', and causes the content model to become ambiguous. A content model must be formed such that during validation of an element informati on item sequence, the particle contained directly, indirectly or implicitly ther ein with which to attempt to validate each item in the sequence in turn can be u niquely determined without examining the content or attributes of that item, and without any information about the items in the remainder of the sequence. Error: There was a validation error on a schema generated during export: Source: Line: 1 Column: 14410 Validation Error: Wildcard '##any' allows element 'http://www.w3.org/2000/09/ xmldsig#:XPath', and cau

Validation(): Attribute 'Factory' is not a valid attribute of element 'ServiceHost'

Hi, I'm using REST WCF3.5. In my .svc file, the Factory attribute is giving me Warning in the Visual Studio Team Suite saying "Validation(): Attribute 'Factory' is not a valid attribute of element 'ServiceHost'." <%@ ServiceHost Language="C#" Debug="true" Service="RestService" CodeBehind="~/App_Code/RestService.cs" Factory="AppServiceHostFactory" %> using System; using System.ServiceModel; using System.ServiceModel.Activation; using Microsoft.ServiceModel.Web; class AppServiceHostFactory : ServiceHostFactory {  protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)  {   WebServiceHost2 host = new WebServiceHost2(serviceType, true, baseAddresses);                 // Add the basic authenticator interceptor   host.Interceptors.Add(new BasicAuthenticationInterceptor(    System.Web.Security.Membership.Provider, "foo"));   return host;  } } I've added the reference as well & Everything works fine but I was wondering why am I getting this warning?? Thanks!  

Error - "Specified element is already the logical child of another element. Disconnect it first."

What I have is a Grid with each cell containing its own canvas.  I have a UserControl (uc) that I want to be able to drag/drop to other cells within grid.  I was able to get my drag/drop of the uc working except for the error in the subject.  On a drag/drop of a uc, I determine the canvas the drag started in, get a reference to the uc, clear the original canvas's children and add the uc to the new canvas.  The wierd thing about this error is that it is not entirely consistent.  Sometimes, I can drag the uc around to three or four different cells before receiving the error.  I have read multiple posts about this error but I don't seem to be able 'disconnect' the uc from its original logical parent.  Help is appreciated.

XML Parsing Error: no element found

I had an old SQL server  2008 instance removed and reinstalled SQL server, SSAS, SSRS all together.   When trying to log onto Report Server, I am seeing following error.  can you hel? thanks     XML Parsing Error: no element found Location: http://myservername:8080/Reports/Pages/Folder.aspx Line Number 1, Column 1:

Excel Data Source SSIS AcquireConnection failed 0x80004005 unspecified error

Nuances of using Excel data sources with SSIS Your Development Machine Setup Needs Jet Drivers, available along with the default Office install so if you have Excel working fine locally, this is enough. Installing the "Office Data Connectivity Components" (download file name AccessDatabaseEngine.exe) as well as having Office installed corrupts the Jet Driver stack so that SSIS in VS 2008 cannot create the object to read the XLS file. You will see the title error "Unspecified Error" and "80004005" code. Resolution: Uninstall the Jet Engine pack on your development XP machine if you have Office. It will be listed as something like "Microsoft Access Database Engine (2010)". Run Office 200x setup with the Repair option and reboot. Try configuring the task in SSIS and it should be able to read the Sheet names again and columns.  Live Server (32-bit and 64-bit) Deploying your SSIS package to a server without Office 200x means it will not have the Jet Engine drivers to read XLS, XLSX files. You must install the 32-bit Office Data Connectivity Components - Jet Drivers mentioned above found here  (http://www.microsoft.com/downloads/details.aspx?familyid=7554f536-8c28-4598-9b72-ef94e038c891&displaylang=en). There are no 64-bit drivers; therefore regardless of 32 or 64-bit live environments, this step is the same. You shoul

Element 'LengthValidator' is not a known element. This can occur if there is a compilation error i

Hi everyone, I got this errors while trying to use an example from the ASP.NET 3.5 Unleashed book.  Webform1.aspx<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplicationFour.WebForm1" %> <%@ Register TagPrefix="custom" Namespace="WebApplicationFour" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title> Show Length Validator </title> </head> <body> <form id="form1" runat="server"> <div> <asp:Label Id="commentLabel" Text="Comments :" AssociatedControlID="commentTextBox" Runat="server" /> <br /> <asp:TextBox Id="commentTextBox" TextMode="MultiLine" Columns="30" Rows="2" Runat="server" /> <custom:LengthValidator Id="lengthCommentValidator" ControlToValidate="commentTextBox" Text="( Must be at least 10 characters )" Runat="server" /> <br /> <br /> <asp:Button Id="submitB

SMS reporting server configuration error: The MemoryLimit Element is not a configuration file elemen

Attempting to configure reporting services for SCCM 2007 SP2 R2. Installed SQL Standard 2008 reporting services. Attempting to configure reporting services, but service will not start w/ error: System.ServiceProcess.TimeoutException: Time out has expired and the operation has not been completed.    at System.ServiceProcess.ServiceController.WaitForStatus(ServiceControllerStatus desiredStatus, TimeSpan timeout)    at ReportServicesConfigUI.Panels.ServerInformationPanel.StartStopServiceTask(Boolean start) Digging into Reporting Services logs reveals: rshost!rshost!1900!09/08/2010-14:50:25:: i INFO: CLR runtime is initialized. rshost!rshost!1900!09/08/2010-14:50:25:: i INFO: Derived memory configuration based on physical memory as 16775112 KB appdomainmanager!DefaultDomain!1b54!09/08/2010-14:50:25:: i INFO: Entered managed ServiceMain in DefaultDomain. configmanager!DefaultDomain!5ac!09/08/2010-14:50:26:: e ERROR: Error loading configuration file: The configuration file contains an element that is not valid. The MemoryLimit element is not a configuration file element. library!DefaultDomain!5ac!09/08/2010-14:50:26:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: , Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error.&nb

Linq to xml to retrieve element value by its attribute

Can someone please tell me how to select the mac element value.  Here is my code that not working.  Thanks. Attempt1:        '* from string        Dim xdoc As XDocument = XDocument.Parse(xmlString)        Dim LQElements = From xe In xdoc.Elements("mac") _                         Where xe.Attribute("type").Value = "eth" _                            Select xe.Value        For Each LQElement In LQElements            Dim mytype As String = LQElement.ToString        Next Attempt2: '* from string Dim xdoc As XDocument = XDocument.Parse(xmlString) Dim LQElements = (From xe In xdoc.XPathSelectElements("//mac") _ Where xe.Attribute("type") = "eth" _ Select New With { _ .type = xe.Attribute("type").Value, _

Error 102 Element 'ScriptManager' is not a known element. This can occur if there is a compilation

I have the same problem with my personal website project : Error 102 Element 'ScriptManager' is not a known element. This can occur if there is a compilation error in the Web site. I have made my web.config file myself. It's strange because the Element 'ScriptManager' is recognize in the SampleWebSite (which contains examples of ajax toolkits). But it's not recognize in my website project ... Do you think is due to my web.config is incorrect ? I send you my web.config : <?xml version="1.0"?> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <configSections> <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup,

De-serialization error, The referenced element with ID 'id0' was not found in the document.

I am trying to talk to a 3rd party (java Based) SOAP web service, and get the error "The referenced element with ID 'id0' was not found in the document." when it tries to de-serialise the repsonse the repsonse is below,  and seem to be correct and complete so i am looking for suggestions on how to resolve this, if it help i ONLY need to get the CONTEXT_ID out of the response <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header><ns1:sessionID soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" href="#id0" xmlns:ns1="http://xml.apache.org/axis/session"/></soapenv:Header><soapenv:Body><ns2:initExportDeviceResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://diamondip.com/netcontrol/ws/"><initExportDeviceReturn href="#id1"/></ns2:initExportDeviceResponse><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="soapenc:long" xmlns:soapenc="-

'inherits' attribute, error

Hey guys. I'm getting this error. Source Error:  Line 1:  PartialClass secure_home Inherits System.Web.UI.Page Line 2:  Protected Sub GridViewZ_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) Line 3:      If e.CommandName = "Add" ThenSource Error:Compiler Error Message: ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl). Line 1:  PartialClass secure_home Inherits System.Web.UI.PageLine 2:  Protected Sub GridViewZ_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs)Line 3:      If e.CommandName = "Add" ThenMy CodeFile has this at the top:PartialClass secure_home Inherits System.Web.UI.PageProtected Sub GridViewZ_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs)My aspx file has this at the top:<%@ Page Language="VB" AutoEventWireup="false"  Codefile="a_Order_Details.aspx.vb" Inherits="secure_home"%>Any idea how to solve this? 

Foreign characters causing a duplicate attribute key error - how to avoid?

Greetings, We have a data warehouse into which we import data obtained from our outside vendors.  The data are then used to build data cubes.  Lately we have started to get a duplicate key error on the "County" attribute in our "Location" dimension.  The problem appears to be caused by these two values returned by the query that returns the distinct list of counties: Spree-Neisse Spree-Neiße These are German counties and they are really the same county, I believe.  Our data warehouse stores County as a varchar.  If I cast the stored value as nvarchar, the query that returns the distinct list of counties returns only the 2nd value and so should avoid the duplicate key error.  (I haven't tried it yet, just speculating.) This post suggests the root cause of the problem: http://ssas-musings.blogspot.com/2009/11/duplicate-key-error.html We don't have any control over the data before our vendors give it to us, and it comes from all over the world.  What is the best way to avoid occurrences of the duplicate attribute key error?  Should we be storing all our character data as nvarchar?  Would it be enough to cast the stored data as nvarchar when the cubes are being built?  Is there a better approach?  I'd like to get an idea of what the best practice would be.  Our warehouse

Error: Specified element is already the logical child of another element. Disconnect it first. with

I'm building an application in which I've created several WPF user controls.  The user controls are essentially 'panels' that will hold content with controls around the outer edge.  The XAML for the main window uses one of these user controls and is attempting to set its content to two other user controls in a dockpanel. Basically, it's to place two smaller panels (one upper and one lower) inside a larger, outer panel.  (See XAML below.) I can place one user control inside the other without a problem.  But when I add the second user control, I get the dreaded: Specified element is already the logical child of another element. Disconnect it first. I really don't understand why.  My understanding of the error is that it comes from attempting to place the same element within the visual tree twice.  An element can't have two parents.  However, each of my user controls is completely separate.  Their underlying viewmodel code derives from the same base class, but each user control is separate.  I'm not even trying to place two of the same kind in there at the same time.  I thought at first that it might be that I had elements named identically in the different controls, so I renamed them so that all are unique.  It makes no difference. So far as I can tell, there are not any duplicate elements anywhere,

Linked Server To MS Access using Jet Returns "unspecified error"

I'm have SQL SERVER 2008 on Win2008 Server. I have several linked servers to Oracle (odbc) and have just created Linked Servers to MS access 2003 databases on network shares. I can 'test connection' and select data from the linked ms access servers using 4 part naming no problem. As soon as I do this, the Oracle db links stop working. I reboot the server, test connection to Oracle dbs , all ok there, run test connection to ms access dbs and receive the following;Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "MYAccessLink"".OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "MYAccessLink" returned message "Unspecified error". (Microsoft SQL Server, Error: 7303) Reboot the server, test connection to ms access db's, all ok, then test connection to oracle, and receive the following;A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - The pipe has been ended.) (Microsoft SQL Server, Error: 109) Reboot server, perform test again, toggling the order and I get the same results.Have tried opening ms access via openrowset and "execute ('select count(*) from SomeTable') at MYAccessLink" to rule out test connection (sp_testlinkedserver) doing something to crash the links. I have checke

New appliesTo attribute on assemblyBinding element in web.config after upgrading website for Visual


We just upgraded from Visual Studio 2008 to Visual Studio 2010. We had to convert our projects and solutions, but we thought no changes were need for regular ASP.net websites. However, Visual Studio 2010 modified the assemblyBinding element in the web.config file to include the appliesTo attribute. The website is still targeting .net 3.5 and will be for a little while until we upgrade everything to 4.0.

So, is this attribute necessary? If so, why? We had hoped we didn't need to update all our websites solely for the purpose of using Visual Studio 2010 as we have a lot of them. We'll take the effort to upgrade them when we finally change them to target .net 4.0. Until then, is the web.config change necessary?

Here is what we had in web.config before the upgrade to Visual Studio 2010:

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

Root element is missing error AFTER changing the List permission


I have an Infopath form that submits the data onto a SharePoint list. Everything works if the user has 'view, insert, edit, delete' access to the list. However, we dont want them to be able to delete and view the item so we gave this user group only 'insert' access. After doing so, they get the following error message:

The following DataObject either cannot be created or cannot be initialized:
The query cannot be run for the following DataObject: NameOfList
InfoPath cannot run the specified query.
The SOAP response indicates that the error occurred on the server:

Server was unable to process request. ==> The root element is missing. 

Anyone know if there's another way to solve this without granting the user group full access to the List?  I'm not an admin, I just normally request what type of permission to set on our sharepoint sites. 

Thanks for the help

Getting error "The XML element 'EnableTheming' from namespace...." When running Web service


Hi everybody i am getting an error

The XML element 'EnableTheming' from namespace 'http://tempuri.org/' is already present in the current scope. Use XML attributes to specify another XML name or namespace for the element.

when i am running my webservice There is no error at build time its build up successfully.

I an getting this error when i return an asp.net pannel from my web method.. but when i am returning simple string its work fine..

Thnks in advance,


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend