Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 20th, 2008, 09:02 AM
samjudson's Avatar
Friend of Wrox
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts

Well my example showed you how to load it into an XmlDocument - can you work the rest out or do we need to do all your work for you.

/- Sam Judson : Wrox Technical Editor -/
Old June 20th, 2008, 09:19 AM
joefawcett's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

Not sure why you are storing XML in an ntext column except for legacy reasons, nvarchar(max) or xml column type much better.
I would construct a query that CASTs the ntext to xml type and manipulates it using standard SQL Server xml methods, nodes, value, query etc. Then create a new xml type with modified data and update column.
Currently SQL Server's XQuery update facilities are poor. If you are only updating one row it's okay but for multiple rows a cursor would probably be needed.

Alternatively change to a query that returns XML by CASTing ntext to xml type and manipulate client-side.
None of this should be too taxing but it's still going to take an hour or so depending on your business rules.

Happy to help with parts but not prepared to do all the work unless you wish to employ me on the project :)


Joe (Microsoft MVP - XML)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Handling recursive XML Nodes using XSL RichaM XSLT 5 June 21st, 2005 02:45 PM
Crystal reports 10 XML handling ferozkhan BOOK: Professional Crystal Reports for VS.NET 3 May 27th, 2005 11:25 AM
Crystal reports 10 XML handling ferozkhan XML 1 August 25th, 2004 08:33 AM
Handling remote XML docs in ASP delbarcr XML 1 March 25th, 2004 11:23 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.