HELP!!HELP!! - Import XMl into SQl using ASp

M

Michael Persaud

HI,

I have a xml file and would like to import its contents into a table in
SQl2000

can some one say how? it has to insert multiple records


Thanks MP
 
G

Graeme Malcolm

There are a number of options for doing this. The most likely candidates in
your case are probably:
1. Create an annotated schema and use the SQLXML Bulk Load component to
import the XML into tables in the database, or
2. Create a stored procedure in the database that uses the OPENXML function
to shred the XML: data into the appropriate tables. You'd then use ADO to
call the stored procedure (passing your XML data as a parameter).

Either of these approaches can be used to insert multiple records.

Your first step should be to download SQLXML 3.0 from
http://www.microsoft.com/downloads/...a9-cf10-4e22-8004-477098a407ac&displaylang=en
and read the documentation on the Bulk Load component. SQL Server 2000 Books
Online includes documentation of the OPENXML function.

If you have any further questions, please post an example of the XML data
and the tables into which it needs to be inserted.

Hope that helps,
Graeme

--
----
Graeme Malcolm
Principal Technologist
Content Master Ltd.
www.contentmaster.com


HI,

I have a xml file and would like to import its contents into a table in
SQl2000

can some one say how? it has to insert multiple records


Thanks MP
 
M

Michael Rys [MSFT]

Look at the SQLXML 3.0 XML Bulkload functionality (if the file is large), or
pass the file to a SQL stored procedure and use OpenXML.

HTH
Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top