471,573 Members | 1,121 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,573 software developers and data experts.

Alternative to OpenXML

Hi All,
I want to pass XML and the data in the XML should be stored in the
tables of the database. However, I do not want to use the OpenXML
statement. Please let me know.

Regards, Shilpa

Mar 17 '06 #1
2 3594
Shilpa (sh*************@unisys.com) writes:
I want to pass XML and the data in the XML should be stored in the
tables of the database. However, I do not want to use the OpenXML
statement. Please let me know.


Which version of SQL Server are you using? If you are on SQL 2000, and
you to insert data in the XML statement piece by piece (and not just
the XML document as such), there is no alternative to OpenXML.

On SQL 2005 you can XQuery to extract data from the XML document.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Mar 17 '06 #2
Stu
Actually, there is an alternative for SQL Server 2000 to the OpenXML
statements: SQLXML BulkLoad. It's a COM-based application dll that you
can use to shove XML documents into relational tables. We just started
working with it, and though it's a bit trivky to set up, it actually
performs better with large amounts of XML than the OpenXML procedures.

However, I'm not sure I understand the OP's original question; OpenXML
is used for parsing XML documents into relational tables. If you just
want to store complete XML documents, just store them in a varchar or
text column. Unless you're specifically querying for a value embedded
in the XML document, it's just easier to manage.

HTH,
Stu

Mar 17 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by JM | last post: by
1 post views Thread by jrd | last post: by
2 posts views Thread by Bostonasian | last post: by
1 post views Thread by Sandy | last post: by
reply views Thread by Micke | last post: by
1 post views Thread by figital | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by Vinnie | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.