Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > HELP!!HELP!! - Import XMl into SQl using ASp

Reply
Thread Tools

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

 
 
Michael Persaud
Guest
Posts: n/a
 
      08-17-2004
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



 
Reply With Quote
 
 
 
 
Graeme Malcolm
Guest
Posts: n/a
 
      08-17-2004
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/d...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


"Michael Persaud" <> wrote in message
news:...
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




 
Reply With Quote
 
 
 
 
Michael Rys [MSFT]
Guest
Posts: n/a
 
      08-17-2004
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

"Michael Persaud" <> wrote in message
news:...
> 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
>
>
>



 
Reply With Quote
 
Michael Persaud
Guest
Posts: n/a
 
      08-17-2004
Thanks....

I got it using the dataset object

works like a charm

MP


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The best file format to import/export data into sql database through asp.net application Max2006 ASP .Net 4 10-09-2007 08:36 PM
Tools to extract data from SQL database and convert it into XML & insert XML data into SQL databases Harry Zoroc XML 1 07-12-2004 10:10 PM
How can I get import an excel file into sql via asp.net page Jake ASP .Net 1 04-07-2004 07:00 AM
import .csv file into SQL Server via asp.net page Andrew J Gray ASP .Net 1 03-04-2004 11:23 AM
Import excel data into SQL server -- ASP.net, C#, DTS -- how?? Rathtap ASP .Net 0 06-30-2003 04:29 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57