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

Discussion in 'ASP .Net Building Controls' started by Michael Persaud, Aug 17, 2004.

  1. 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
     
    Michael Persaud, Aug 17, 2004
    #1
    1. Advertising

  2. 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


    "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
     
    Graeme Malcolm, Aug 17, 2004
    #2
    1. Advertising

  3. 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
    >
    >
    >
     
    Michael Rys [MSFT], Aug 17, 2004
    #3
  4. Thanks....

    I got it using the dataset object

    works like a charm

    MP
     
    Michael Persaud, Aug 17, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rathtap
    Replies:
    0
    Views:
    2,153
    Rathtap
    Jun 30, 2003
  2. Andrew J Gray
    Replies:
    1
    Views:
    9,143
    Teemu Keiski
    Mar 4, 2004
  3. Jake
    Replies:
    1
    Views:
    692
    Ian Oldbury
    Apr 7, 2004
  4. Harry Zoroc
    Replies:
    1
    Views:
    947
    Gregory Vaughan
    Jul 12, 2004
  5. Max2006
    Replies:
    4
    Views:
    597
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Oct 9, 2007
Loading...

Share This Page