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 |
Why do we use virtual methods in c#?
What is string concatenation?
Hi, Can we implement the Abstract class on interface in c#, If yes then provide the code implementation
Explain the difference between passing parameters by value and passing parameters by reference with an example?
What are the benefits of using the aggregate method in linq?
what is CLONE() method?
Indexers in c#?
8 Answers Intaglio, Microsoft, TCS,
What is the use of base keyword? Tell me a practical example for base keyword’s usage?
What is whitespace in c#?
Explain the difference between proc. Sent by val and by sub?
What is yield break in c#?
What is a clr (common language runtime)?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)