Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can we convert XML Data to DataBase Table in C#.Net?

Answer Posted / arindamrudra

If the XML Document comes like this

@XmlDocument ='<PARAMS><STATIC><INTERVIEWDATETIME>2/13/2009</INTERVIEWDATETIME></STATIC></PARAMS>'

We will have to write

EXEC sp_xml_preparedocument @docHandle OUTPUT, @XmlDocument

@docHandle and @XmlDocument are variable of datatype int and XML respectively.


then we have to use the similar type of code to get the value from XML and the variables should be taken on the basis of the datatype coming from the XML.

DECLARE @date1 DATETIME
SELECT
@date1=Date11
FROM OPENXML(@docHandle, 'PARAMS/STATIC', 1)
WITH
(Date11 DATETIME 'INTERVIEWDATETIME')
EXEC sp_xml_removedocument @docHandle

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is bitwise operator in c#?

934


What is 8 bit signed integer?

915


What is difference between managed and unmanaged code?

999


Define multicast c# delegate?

963


What is an assembly qualified name? Is it a filename? How is it different?

948


Where do we use static class in c#?

921


In .NET how can you solve the DLL Hell problem?

1170


How can I make sure my c# classes will interoperate with other .net languages?

1012


How to implement delegates in c#.net

1020


Which is faster array or arraylist in c#?

911


How can you set image source dynamically from c# application to ”test.png” file?

1079


What is a partial method?

966


What is the difference between struct and class c#?

995


What is multithreading? What are the problems that comes with multithreading and how to manage them?

978


can you create a function in c# which can accept varying number of arguments

1081