Read and Write XML Content into SQL Server

I have an XML file 'D:/Message.XML' with contents as follows

       <Description>Test for Message</Description>

I have a SQL table 'tblMessages' with
- Id (Identity column)
- Description nvarchar(max)
- User nchar(10)

I have a c# class file which has a function (InsertXMLContent()). I would like to read the XML file and write the content into the SQL table.

Thanks in advance.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

- Open the xml file and get the content of xml. Then pass the xml to your storedprocedure.
- Read the xml in your storedprocedure and save the values to the table. Example

Sorry didn't find some better examples.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Monica PSoftware DeveloperCommented:

Read the XML Data and pass it into the SQL ..

Read XML Data :

Read XML data and save it in the varaible.

After .,making use of the Insert statement to enter the saved  values in to Database
Monica PSoftware DeveloperCommented:
thank you
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.