[英]Reading a XML file from SQL Server in ASP.NET
An XML file was saved into a SQL Server database with the following code: 使用以下代码将XML文件保存到SQL Server数据库中:
USE XML
GO
INSERT ENTERTAINMENT (content)
SELECT * FROM
OPENROWSET(bulk 'c:\entertainment-jist.xml', single_blob ) AS X
The file was saved in a column with an xml
datatype. 该文件保存在具有xml
数据类型的列中。
How can the whole content of this file be read in an asp.net page using C#? 如何使用C#在asp.net页中读取此文件的全部内容?
您可以使用SqlDataReader.GetSqlXml读取XML字段。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.