XML File - split up and add to SQL table

M

Mark

Hi

I have an XML file with 50 fields,
I want to split up these fields and put them in the corresponding fields in
the SQL table

whats the most efficent way to do this? and how do i do it

...also, i'd like to get threads of problems with solutions (like the NG's)
sent to my inbox, anyone know of any?

Thanks in advance
Mark
 
H

Hermit Dave

Well for Starters
if you have one to one field mapping from xml into sql then use openxml...
(sql server xml)...
read the document using XMLStream and send it straight off to database for
it to handle the problem

if not... read look up System.XML namespace.. you have too many different
class that give you all sorts of features...
Again you need to read the xml to decide what needs to be sent to your
inbox..
use cdonts or use smtpmail...

Regards,

HD
 
C

Carl Prothman [MVP]

Mark said:
I have an XML file with 50 fields,
I want to split up these fields and put them in the corresponding
fields in the SQL table
Whats the most efficent way to do this? and how do i do it

Mark,
Try using the "System.Xml.XmlDataDocument" class. You can read in
an XML file, then sync it up with a DataSet. You can then create and
use a SqlDataAdapter to insert the data into a SQL database.

For more information, see:
http://msdn.microsoft.com/library/e...onsynchronizingdatasetwithxmldatadocument.asp

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP
http://www.able-consulting.com
 
M

Mark

Thanks both

The field mapping is one to one, i've tried looking up
help on OpenXml but cant find it, cant you give me a
little bit more of a clue so I can go looking
Thanks
Mark
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top