How can we convert XML Data to DataBase Table in C#.Net?
Answers were Sorted based on User's Feedback
Answer / babar shaik
using System.XML;
We can fill the Dataset using
Ds.ReadXML();
Then Update the Data into Database.
Is This Answer Correct ? | 13 Yes | 5 No |
Answer / 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 |
How do I simulate optional parameters to com calls?
What is data binding with example?
Is predicate a functional interface?
What is the difference between c and c# programming?
Is array ienumerable c#?
Explain About delegates
From which base class do all Web Forms inherit from?
can you allow a class to be inherited, but prevent the method from being over-ridden?
5. What properties we used to call stored procedure in C#?
In howmany ways can you deploy an assembly?
What is the default value of date?
How do you clear a list in c#?