Importing XML File records into the SQL Server Database table 
Author Message
 Importing XML File records into the SQL Server Database table

Hi Everybody

Can anybody tell me about the different options available to imports XML
file records to the database table
that is
1. Through ASP.NET
2. Any direct Import option in SQL Server to import XML files to the
database table
3. Any other tricks available to import XML file records to the database

Please mention the advantage, disadvantages & performace issues for the
options (If possible!!)

Waiting for your valuable response

Thanks in advance
Shankar



Tue, 01 Feb 2005 13:40:38 GMT  
 Importing XML File records into the SQL Server Database table
Wow. Where to begin?

1.  Get a book about ADO.NET.  Read it.  Many good ideas there.
2.  Use SQLXML and annotated mapping schema.  You can take an XML schema
that corresponds to the type of XML document that you want to import, mark
it up with the appropriate database tables and fields, and submit it to your
database through ADO.NET and SQLXML using diffgrams.  Very elegant solution.
3.  Create a dataset that looks like your database.  Use the ReadXML method
of the dataset to open the XML file and populate the dataset.  Create a
DataAdapter object that will do your updating for you.


Quote:
> Hi Everybody

> Can anybody tell me about the different options available to imports XML
> file records to the database table
> that is
> 1. Through ASP.NET
> 2. Any direct Import option in SQL Server to import XML files to the
> database table
> 3. Any other tricks available to import XML file records to the database

> Please mention the advantage, disadvantages & performace issues for the
> options (If possible!!)

> Waiting for your valuable response

> Thanks in advance
> Shankar



Wed, 02 Feb 2005 01:18:43 GMT  
 Importing XML File records into the SQL Server Database table
Depending on the structure of the XML input, you may be able to load it into
a DataSet and issue a DataAdapter.Fill to insert the rows into SQL Server.
You can also use OPEN XML to shred an XML string into SQL Server tables.
Another option is using mapping schemas with an UpdateGram and SQLXML 3.0.
You might also look at using XML Bulk Load.  I cover all of these techniques
in my book, but there are also examples of all of these approaches in the
SQLXML SDK, SQL Server Books Online, and the .NET Framework SDK.

--
Kirk Allen Evans
http://www.xmlandasp.net
Author, "XML and ASP.NET", New Riders Publishing
 http://www.amazon.com/exec/obidos/ASIN/073571200X


Quote:
> Hi Everybody

> Can anybody tell me about the different options available to imports XML
> file records to the database table
> that is
> 1. Through ASP.NET
> 2. Any direct Import option in SQL Server to import XML files to the
> database table
> 3. Any other tricks available to import XML file records to the database

> Please mention the advantage, disadvantages & performace issues for the
> options (If possible!!)

> Waiting for your valuable response

> Thanks in advance
> Shankar



Wed, 02 Feb 2005 01:59:27 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Inserting records from one database table to another in SQL Server

2. simple remote xml import into sql server

3. How to import XML file in Project Server

4. Import xls file into SQL Server using VBscript and exe function on remote server

5. Import text file in SQL Server 6.5 via SQL in Visual Basic

6. Import text file in SQL Server 6.5 via SQL in Visual Basic

7. How to Import records in Sql Server FAST

8. Import Text(Tab delimited) to SQL Server Table

9. List SQL Server Servers, Databases and Tables

10. table import and export from and to SQL server via vbscript

11. Import Excel data to SQL Server table from VB

12. importing text file into multiple records in table?

 

 
Powered by phpBB® Forum Software