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

Top 5 Contributors of the Month
Post New Web Links


Posted By:      Posted Date: September 07, 2010    Points: 0   Category :Sql Server
I just installed SQL2005 and VS2005.  It appears that a new version of SQLXML is available, SQLXML 4.0.  Does anyone know if this version is compatabile with SQL2000?  I am going to use the SQLBulkLoad library.  I could not find a download of SQLXML 4.0.  Does anyone know how to redestribute this version of SQLXML? Thanks

View Complete Post

More Related Resource Links

SQLXML 3.0: Build Data-Driven Web Services with Updated XML Support for SQL Server 2000


XML is becoming the ubiquitous data format on the Web, and XML support in SQL Server is evolving to meet the additional demand. Using XML, SOAP, HTTP, and SQL Server, you can now build powerful Web Services easily. To show just how simple it is with SQLXML 3.0, this article walks the reader through the process step by step, from setting up a virtual directory enabling data access via HTTP to executing queries and building Web Services. Finally, the author illustrates the creation of two Web Services clients-one with C# that works with the Microsoft .NET Framework and one with the SOAP Toolkit 2.0 for anyone still using earlier development tools.

Christian Thilmany

MSDN Magazine May 2002

visual editors and checkers that works with Microsoft's SQLXML

Are there visual editors and checkers that works with Microsoft’s SQLXML to creat sql annotations in XSDs?   How would I use annotations when an element in a schema is a reference to another schema?  

SQLXML 4.0 with Service Pack 1 - Do I Need With SQL Server 2008 R2


I am in the middle of doing a Biztalk Server 2010 install on a developer machine. In the instructions it reads:

SQLXML 4.0 with Service Pack 1  Enables XML support for your SQL Server database and allows developers to bridge the gap between XML and relational data. You can create an XML view of your existing relational data and work with it as if it were an XML file. To install SQLXML 4.0 SP1, see Microsoft SQL Server 2008 Feature Pack (http://go.microsoft.com/fwlink/?LinkID=189325).


My question is, do I still need to install this if I'm using SQL Server 2008 R2 Developer?  Thanks.


Microsoft SQLXML Bulkload 4.0 Type Library with SQL Express



I'm trying to follow a sample from microsoft for Using SQLXML Bulk Load in the .NET Environment

In the sample c# console app. it says to select add reference then In the COM tab, select Microsoft SQLXML Bulkload 4.0 Type Library (xblkld4.dll) and click OK.

The problem I have is I cannot find the library or the xblkd4.dll file on my pc.

Does anyone have any suggestions? Any help would be much appreicated.



SQLXML BulkLoad Table Insertion Order?


So I am trying to load some XML into SQL Server 2008, using SQLXML 4.0 which I am calling from C# to bulkload the xml. I have generated the DB tables and build the XSD. I have annotated the XSD so that it should understand the relationships in SQL Server. I have been trouble shooting an error related to a foreign key constraint, and I believe that the only issue is that the tables are not loaded in the correct order. To prove this I simplified my example to something like this:

Table_A (id, adata)
Table_B(id, bdata)
Table_C(id, fk_a_id, fk_b_id)
Table_D(id, fk_c_id)

All of the ids are IDENTITY fields generated by SQL Server. It works and I am able to load the data. I am quite pleased because at least I am loading some of it, as it has been a long time in coming. But then if I start adding back in more of the full xml schema to something like this, I start with the foreign key constraint problems again:

Table_A (id, adata)
Table_B(id, bdata)
Table_C(id, fk_a_id, fk_b_id)
Table_D(id, fk_c_id, fk_x_id)
Table_X(id, xdata)

It should be able to load these tables in an order like A, B, C, X, D and the constraints shouldn't cause any issues. But it doesn't seem to work that way. The must be loading like A, B, C, D, X.

Is there a way in the XSD or somewhere else to load tables in a certain order? I read s

Is it possible SQLXML to accept the Base64Binary data type and convert it back to binary to a 'ntex


Hi, I am trying to pass to SQLXML ("SQLXMLBulkLoad.SQLXMLBulkload.4.0") an XSD schema to be able to accept the Base64Binary data type and convert it back to binary to a 'ntext' type field(Due to a legacy DB that sore some Binary data at a 'ntext' field at SQL Server)

I have try the following without success:

'<xsd:attribute name="Mybase64field" type="xsd:base64Binary" sql:datatype="image" />'

Is this possible?

"Incorrect document syntax" error when using SQLXML 3.0 Bulkload


I was trying to upload an XML file into MS SQL Server 2000 DB using SQLXML 3.0 Bulkload functionality. However, there was an error says "Incorrect document syntax". I found out it was because my file started with:

<?xml version="1.0" encoding="UTF-8"?>
<CDR version="14.2">

If I remove the second line "<!DOCTYPE CDR>", everthing works fine. However, this file is generated by a third part system and I plan to upload it automatically. Sue I can remove the second line before loading the data. But I am wondering, is there a way of bypass this validation issue in SQLXML?

Can anybody help me here? Thanks in advance.


How to specify scale on XSD used for SQLXML import

I have an XSD that is marked up with SQLXML 4.0 annotations.  This schema is used for bulk importing xml data into a SQL server database.  When the data type is decimal, the default behavior specifies that the scale be 0 (which will not allow for decimal places).  I know I can introduce a post process that will use SMO to change the scale, but is there a way to specify scale along with the data type using SQLXML annotations on the XSD?

SQLXML 4.0 64 Bit for SQL Server 2005


Our client just recently installed SQL Server 2005 WorkGroup edition (32 bit) on a Windows Server 2008 R2 Standard 64 Bit machine.  We ourselves installed a custom windows service that utilizes SQLXML 4.0 to insert data into our clients database.  We cannot install the 32 bit version of SQLXML 4.0 that is on the SQL 2005 cds because it is not supported by the operating system.

Is there anyway that we can get a copy of the 64 bit version of SQLXML 4.0?  Is that only for SQL Server 2008?  We are really in a bind here, the client obviously purchased SQL 2005 so they would like to use it, and at the same time we dont want to rewrite our Windows service that requires SQL 4.0 if we can help it.  

Anybody out there have any feedback?



the constant/fixed element cannot have attributes sqlxml bulkload error


My xml schema fails in getting attributes from 'empty' element... using sql:is-constant="1" disables reading attributes and by not using constant for element, error comes back with define relation... element is only a header for the attributes...

part of the xml:

<orderitem id="124810">


<name><![CDATA[Jac Digilabel folie tra glos]]></name>


<attribute name="ALGEMEEN_KLEUR"><![CDATA[Transparant]]></attribute>

<attribute name="ALGEMEEN_FORMAAT"><![CDATA[320x460]]></attribute>

<attribute name="ALGEMEEN_GEWICHT"><![CDATA[110]]></attribute>

DataSet/DataTable to SqlXml SqlDbType



how would i convert DataSet/DataTable to SqlXml SqlDbType and save it to Sql Server Table?

I'm using Sql Server 2008 R2.

protected void SqlDataSource1_Inserting(object sender, SqlDataSourceCommandEventArgs e)
    if (ViewState["dsTest"] != null)
        DataTable dt = ((DataSet)ViewState["dsTest"]).Tables["Info"];
        SqlXml Qxml = new SqlXml();
        //convert DataTable to SqlXml[Qxml]
        e.Command.Parameters["@Info"].Value = Qxml;

    <asp:Parameter Name="Info" Type="Object" />
Whatever i try, i get back error:

System.Data.SqlClient.SqlException: Operand type clash: sql_variant is incompatible with xml


Thanks for the help.

Returning SQLXml from CLR assembly fails when calling using ADO.NET


Currently I am calling as CLR function that returns SqlXML. The XML is over 4000 characters long and every time I issue the command from ADO.NET it keeps failing with the following Exception


A .NET Framework error occurred during execution of user-defined routine or aggregate \"Library.GetContentTypes\": \r\nSystem.NullReferenceException: Object reference not set to an instance of an object.\r\nSystem.NullReferenceException: \r\n   at System.Data.SqlServer.Internal.CClrLobContext.HManagedContext()\r\n   at System.Data.SqlServer.Internal.ClrLevelContext.GetCurrentContextForLobAccess(CClrLobContext* pLobContext)\r\n   at System.Data.SqlServer.Internal.ClrLevelContext.GetXvarXmlStream(CXVariantBase* pxvarSource, XvarLOBStreamInitCode eCode, CClrLobContext* pLobContext)\r\n.

The ADO.Net procedure looks like this 



Database db = CreateConnection();
      DbCommand dbCommand = db.GetStoredProcCommand("[dbo].[Library.GetContentTypes]");
      SqlParameter rv = new SqlParameter("@returnvalue", SqlDbType.Xml);
      rv.Direction = ParameterDirection.ReturnValue;

SQLXML Bulk Loader - ConnectionCommand property


I'm having a bit of bother with the SQLXML bulk loader component - has anyone come across something similar, and (more importantly) know what to do about it. Been bashing my head against this for two days now.

Basically, we're using the SQLXML bulk loader to bring in large (>100gb) XML files on a daily basis - we're noticing on some of the larger tables that consecutive imports appear to 'trip over' each other and we'll get Identity columns which link to one source file being populated with data from another. The source file has the a structure of this form:

<xml><client><booking><note><noteline/> (and back out again)

It also has other heirarchies within the <booking> and <client> nodes. So, if we have two files which look a bit like this:

<xml><client name="Ahchay"><booking ref="123"><note date="01/04/11"><noteline lineno="1" text="This is a note"/> etc


<xml><client name="Smith"><booking ref="345"><note date="02/04/11"><noteline lineno="1" text="This is another note"/> etc

Then the note from the second file (Smith) is being assigned to the equivalent record in the first file (Ahchay)

I suspect that this is

SQLXML 4 - How to specify a relationship on repeating element of global complex type


I have tried to create a sample showing the issue.  Basically we have multiple elements that use a global complex type.  This complex type has a repeating element and, therefore, should have another relationship specified for it.  I've tried specifying two relationships on the "Phone" element that reference their respective parents, but that does not work.  Is this scenario supported in SQLXML using SchemaGen?

<?xml version="1.0" encoding="utf-16"?>
<xs:schema version="1.0" xmlns:xs
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