<legend id='BLqOa'><style id='BLqOa'><dir id='BLqOa'><q id='BLqOa'></q></dir></style></legend>
  • <small id='BLqOa'></small><noframes id='BLqOa'>

    <i id='BLqOa'><tr id='BLqOa'><dt id='BLqOa'><q id='BLqOa'><span id='BLqOa'><b id='BLqOa'><form id='BLqOa'><ins id='BLqOa'></ins><ul id='BLqOa'></ul><sub id='BLqOa'></sub></form><legend id='BLqOa'></legend><bdo id='BLqOa'><pre id='BLqOa'><center id='BLqOa'></center></pre></bdo></b><th id='BLqOa'></th></span></q></dt></tr></i><div id='BLqOa'><tfoot id='BLqOa'></tfoot><dl id='BLqOa'><fieldset id='BLqOa'></fieldset></dl></div>
    • <bdo id='BLqOa'></bdo><ul id='BLqOa'></ul>

    <tfoot id='BLqOa'></tfoot>

        在 Sql Server 中启用 DTD 支持

        时间:2023-06-07

        <small id='vurM6'></small><noframes id='vurM6'>

          1. <tfoot id='vurM6'></tfoot>

              <tbody id='vurM6'></tbody>
              <legend id='vurM6'><style id='vurM6'><dir id='vurM6'><q id='vurM6'></q></dir></style></legend>
                <bdo id='vurM6'></bdo><ul id='vurM6'></ul>
                1. <i id='vurM6'><tr id='vurM6'><dt id='vurM6'><q id='vurM6'><span id='vurM6'><b id='vurM6'><form id='vurM6'><ins id='vurM6'></ins><ul id='vurM6'></ul><sub id='vurM6'></sub></form><legend id='vurM6'></legend><bdo id='vurM6'><pre id='vurM6'><center id='vurM6'></center></pre></bdo></b><th id='vurM6'></th></span></q></dt></tr></i><div id='vurM6'><tfoot id='vurM6'></tfoot><dl id='vurM6'><fieldset id='vurM6'></fieldset></dl></div>
                  本文介绍了在 Sql Server 中启用 DTD 支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我有各种 xml 文档需要存储在数据库列中.这些文档包含对 DTD 的引用,并且 SQL Server 不会导入 xml,因为它存在安全风险.如何在数据库上启用 DTD 支持,以便我插入 xml 内容.

                  I have various xml documents that I need to store in a database column. The documents contain references to a DTD and SQL Server won't import the xml because it is a security risk. How can I enable DTD support on the database so it will let me insert the xml content.

                  推荐答案

                  你必须先CONVERT.

                  MSDN:

                  您可以使用以下命令从包含 DTD 的数据文件中导入 XML 数据OPENROWSET(BULK...) 函数,然后指定 CONVERT命令的 SELECT 子句中的选项.的基本语法命令是:

                  you can import XML data from a data file that contains a DTD by using the OPENROWSET(BULK...) function and then specifying the CONVERT option in the SELECT clause of the command. The basic syntax for the command is:

                  INSERT ... SELECT CONVERT(...) FROM OPENROWSET(BULK...)

                  示例:

                  INSERT T1
                    SELECT CONVERT(xml, BulkColumn, 2) FROM 
                      OPENROWSET(Bulk 'c:\temp\Dtdfile.xml', SINGLE_BLOB) [rowsetresults];
                  

                  这篇关于在 Sql Server 中启用 DTD 支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:为 SQL 表中的每一行粉碎 XML 下一篇:如何从 XMLType 节点中提取元素路径?

                  相关文章

                  最新文章

                2. <small id='Pop2R'></small><noframes id='Pop2R'>

                    • <bdo id='Pop2R'></bdo><ul id='Pop2R'></ul>
                    1. <legend id='Pop2R'><style id='Pop2R'><dir id='Pop2R'><q id='Pop2R'></q></dir></style></legend>

                      <tfoot id='Pop2R'></tfoot>
                      <i id='Pop2R'><tr id='Pop2R'><dt id='Pop2R'><q id='Pop2R'><span id='Pop2R'><b id='Pop2R'><form id='Pop2R'><ins id='Pop2R'></ins><ul id='Pop2R'></ul><sub id='Pop2R'></sub></form><legend id='Pop2R'></legend><bdo id='Pop2R'><pre id='Pop2R'><center id='Pop2R'></center></pre></bdo></b><th id='Pop2R'></th></span></q></dt></tr></i><div id='Pop2R'><tfoot id='Pop2R'></tfoot><dl id='Pop2R'><fieldset id='Pop2R'></fieldset></dl></div>