xml to sql server using asp.net 2.0

2 views
Skip to first unread message

Danny

unread,
Jan 31, 2006, 11:05:53 AM1/31/06
to Open Source .NET forum
I need to get xml documents into sql server. I am using asp.net 2.0
(c#). I have been advised to pull the xml document into a dataset and
then push this to sql server. Can this be done without mapping the
individual fields? If so can someone point me to an article that shows
how to do this.

If the above could be used I assume there would need to be code that
automatically creates the tables in sql server from the dataset on the
first run, then on other runs would insert from the dataset into sql
server.

As the xml document I will be receiving has a large number of fields,
my aim is to bring the document into sql server without having to map
the individual fields.

Thanks for any help
Danny

the hogans

unread,
Jan 31, 2006, 1:34:32 PM1/31/06
to Open-Sourc...@googlegroups.com
if you store the xml docs as xml blobs in a single text column then
you don't need datasets or table mappings. You can programmatically
retreive the blob by selecting the column you stored the doc in.


--- Danny <danny...@gmail.com> wrote:


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Danny Grieve

unread,
Feb 1, 2006, 5:16:17 AM2/1/06
to Open-Sourc...@googlegroups.com
I have a number of existing relational tables that the xml data needs to be inserted into. Some processing of the data needs to be done before inserting into the existing tables. Thats why I was going to put the xml into some tables that reflect the xml structure, for example a table called XmlData.I can then query the table XmlData and insert into the existing relational tables. I am trying to find the easiest way of creating and inserting into the table XmlData, without having to map each field (as there are many fields). Do you know a way I can do this?
 
 
Thanks
Danny

 
Reply all
Reply to author
Forward
0 new messages