BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
SQL XML
Annotating .NET Updategrams
SQLXML - .NET Updategrams
.NET XPath Queries
SQLXML - Mapping Relationships To XML
SQLXML - Mapping .NET Schemas
.NET & OPENXML
.NET Parameterized Templates
SQLXML - Raw mode
SQLXML - FOR XML mode
Automate saving options from ADO into an XML format
Microsoft's dataselect functionality in the XML DSO
VB/ADO to DataIsland
Inserting nodes: String Load or Dom Load?
WebDAVExplorer
XML-based Internet RPC (XIR)
XDO
Translating an ADO recordset's XML to another XML vocab
How to find distinct values from XML (Muenchian Technique)
Converting to DateTime format in SQL
Filtering unique values
<< SEO
System.XML >>

By :Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :03/24/2008
Times viewed :241

 

.NET Managed Classes

Now that we know about the concepts of data access in SQLXML it is time to actually look at the managed classes to leverage them. SQLXML ships with COM objects as well as with managed code classes to interact with SQL Server in an XML-centric fashion. In the next four sections we will investigate the managed classes and see how we can issue XPath queries, send Updategrams, how we can interact with the DataSet class. Last but not least we will also take a look how we need to process errors occurring during SQLXML operations. Table 15.8 lists the managed classes of SQLXML.

1.8            The Microsoft.Data.SqlXml namespace contains four classes to access the SQLXML functionality from .NET applications.

Managed Class

Purpose

SqlXmlCommand

The command class of the SQLXML provider. Can perform queries using queries stored in XML documents called XML templates. Can be used to update data using an Updategram or a Diffgram. Also provides support for client side XML processing.

SqlXmlParameter

Used with a SqlXmlCommand object to provide parameter values for parameterized SQL statements, Templates and Updategrams.

SqlXmlAdapter

The Adapter class for the SQLXML provider. Allows you to fill a DataSet with data from a SqlXmlCommand.

SqlXmlException

The SqlXmlException excapsulates error information returned by SQL Server.

Notice that the SQLXML library does not expose a connection class. Data access with SQLXL never maintain any connections, which forces all your queries onto separate connections and isolates all your database updates. Consequently, there is no concept of distributed transactions spawning across multiple commands or databases that can be committed and rolled back with SQLXML. The only transacted operations are the changes defined by a single <sync> block of an Updategram. These only run in the context of a local SQL Server transaction. Local transactions offer much better performance than the distributed transactions managed by COM+/.NET ServicedComponents, but they only run inside a single command execution and within a single database instance. Furthermore, you need to carefully design your Updategrams to tailor the transaction boundaries to the needs of your application. So much for the class that is not there, now let’s look at the classes that are.


Rate this article on a scale of 1 to 10

Your vote :  


 

Recent Jobs

Software Developers Needed in Charl
Sr. Software Engineer - Analytics
Immediate Mainframe openings for Ch
Immediate TANDEM-TAL openings for C
Immediate ASP.NET/C# Openings for C

View all Jobs (Add yours)
View all CV (Add yours)



gotomeeting
swimming pool contractor
conference call
water softener
Teleconference
Host Department NOLIMIT Web Hosting
MSN
sunglasses


    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP