'Declaration Public Function CreateXmlReader() As XmlReader
public XmlReader CreateXmlReader()
public: XmlReader^ CreateXmlReader();
'Declaration Public Function CreateXmlReader() As XmlReader
public XmlReader CreateXmlReader()
public: XmlReader^ CreateXmlReader();
When a XmlReader is created by the provider, a request on the existing connection is opened. The Advanced SQL Engine only allows 16 open requests per a connection. Therefore, there can only be up to 16 XmlReaders that are opened at the same time. This limit also applies when a combination of LOBs and XmlReaders are concurrently opened.
Because the XmlReader uses provider resources to access the database, it is highly recommended that Xml.XmlReader.Close be called before a XmlReader instance is disposed during garbage collection. This will guarantee that the request that was created will be closed and that other resources will be cleaned up.
The conformance level (Xml.ConformanceLevel) has been set to ConformanceLevel.Fragment. The reason for this is that the SQL Xml data type supports both Xml documents and fragments.
Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019