1
Answer

Convert dataset to xml

Nagu

Nagu

7y
156
1
In my dataset,datetime column is there in that data is like "5/23/2017 1:13:43 PM"but after convert dataset to xml data is getting like "2017-05-23T13:13:43+05:30".How to avoid that datetime convertion.
 
Using this method:
return Content(ds.GetXml(), "text/xml"); 
Answers (1)
0
Anil Kumar

Anil Kumar

NA 872 55.9k 9y
code is looking fine by the looks of it. Just check for null value, before appending it to the string builder..
0
Sousa Pambo

Sousa Pambo

NA 92 12.6k 9y
I think is the way i organized the (') or ("") in these lines

sqlBuilder.Append(frmAl.tbQrtResp2.Text + "','"); //9

sqlBuilder.Append("@PicResp2,'"); //10
sqlBuilder.Append(frmAl.tbCasaResp2.Text + "')"); //11

it shows there's a error near the last line
0
Anil Kumar

Anil Kumar

NA 872 55.9k 9y
What error you are getting?