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
What is bitwise operator in c#?
What is 8 bit signed integer?
What is difference between managed and unmanaged code?
Define multicast c# delegate?
What is an assembly qualified name? Is it a filename? How is it different?
Where do we use static class in c#?
In .NET how can you solve the DLL Hell problem?
How can I make sure my c# classes will interoperate with other .net languages?
How to implement delegates in c#.net
Which is faster array or arraylist in c#?
How can you set image source dynamically from c# application to ”test.png” file?
What is a partial method?
What is the difference between struct and class c#?
What is multithreading? What are the problems that comes with multithreading and how to manage them?
can you create a function in c# which can accept varying number of arguments