I got the SqlXml managed provider blues.

prefix = o ns = "urn:schemas-microsoft-com:office:office"
am really tired of writing the following code every time I use the SqlXml managed




XmlReader reader = command.ExecuteXmlReader();


catch (SqlXmlException


exception.ErrorStream.Position = 0; 

throw new ApplicationException(new StreamReader(exception.ErrorStream).ReadToEnd(),




problem is that all the interesting information for a SqlXml error is contained in
the ErrorStream and not in the exception description.  This
and a few other reasons have finally driven me to write my own SqlXml managed provider.  It
will probably be more like an adapter (in the Gang of Four sense) which aggregates
the existing provider because I’m going to tweak the interface quite a bit to my own
taste.  But hopefully it will enable me
to reuse the 100 lines of code or so that I have to include every time I use the SqlXml
managed provider.  I will post the new
provider when I finish developing it.


it probably suggests that we should ship a new version of the managed provider some
time.  "urn:schemas-microsoft-com:office:smarttags" />As
part of our port of the SqlXml code to managed code for Whidbey/


, we have taken the opportunity to completely rewrite the object model and programming
API.  For some of the new features (like
XQuery) we had to do this, but in general it gave us a one time chance to fix “everything”.

Comments (0)