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

Explain 'structure padding'?

1175


If a.equals(b) is true then a.gethashcode & b.gethashcode must always return same hash code.

1064


We cannot create instances of static classes. Can we have constructors for static classes?

1054


Explain what are three test cases you should go through in unit testing?

994


Why do we use threads in c#?

1034


What is serialization in c#?

948


Which namespace is required to implement trace ?

1031


What is the difference between first and firstordefault?

957


what is boxing and unboxing?can we initialize unboxing directly?

941


Why do we use public static void main in c#?

994


What is the difference between string and string in c#?

1038


What is the usage of Enumeration in C# Programming and is it good to use or not ?

1018


Is string value type c#?

962


Explain the process of polymorphism with an example?

963


What is sqladapter c#?

1003