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

How do I create a multilanguage, single-file assembly?

873


What is the base class for array types?

991


what is the meaning of Object lifetime in OOPS

916


Can extension methods access private members?

850


How would you describe encapsulation in c#?

841


What is Fragmentation and its Types?

940


what is main function of alternate teamplate of datalist?

2237


What does get set mean in c#?

863


Define c# delegate?

948


What is the use of partial methods?

1005


What is serialization in unity?

856


What does ienumerable mean?

848


What is a custom attribute?

846


Can I do things in il that I can't do in c#?

870


What are the different types of assemblies available and their purpose?

862