Enjoy Every Sandwich

Thoughts on SQL, XML, .NET and sometimes beer.

<July 2008>
SuMoTuWeThFrSa
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789


Navigation

Tools

List O'Links

Kent's Other Stuff

Subscriptions

News

Please read these
Notices and Disclamiers

Post Categories

Article Categories



Loading an XML Schema Collection from a File

A commonly asked question is "how can I load an existing XSD file into an XML Schema Collection?" It's pretty easy:

declare @don xml
select @don=bulkcolumn from openrowset(bulk 'c:\users\ktegels\some.xsd',single_blob) as s
create xml schema collection dbo.collectionName as @don
go

Subsituting the location for your file following the BULK provider in the OpenRowSet source.

posted on Friday, September 22, 2006 9:17 AM by ktegels





Powered by Dot Net Junkies, by Telligent Systems