Click here to Skip to main content
15,907,906 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need to consume the data from SVC web service and need to insert to database, but i m unable to complete the task. i google a lot, and every where i got the result with help of javascript, but i need to complete with code behind only.

What I have tried:

I got the result in
String myResponse = sr.ReadToEnd();
in below format
{ResponseCode:"S00",MEMBERS:{"M":100087836,"RI":21,"F":20024677,"N":"S Kumar","FSN":"AC Jain Jain","DOB":"09/04/1974","G":1,"V":86640,"R":0,"AC":"55171004149","I":"BKID07747817","MNo":9110789495,}}
Posted
Updated 19-Jul-19 1:32am
Comments
Richard MacCutchan 19-Jul-19 3:24am    
What is the problem?
Anuragintit 19-Jul-19 3:52am    
i need to take into string or data table and insert into database..

 
Share this answer
 
Comments
Anuragintit 19-Jul-19 7:32am    
Completed the task with adding below

JObject jsonObj = JObject.Parse(response);
string ServiceRes = jsonObj["ResponseCode"].ToString();

Int32 ID = Convert.ToInt32(jsonObj["MEMBERS"]["M"]);
string RI = jsonObj["MEMBERS"]["RI"].ToString();
string F = jsonObj["MEMBERS"]["F"].ToString();
Completed the task with adding below


JObject jsonObj = JObject.Parse(response);


string ServiceRes = jsonObj["ResponseCode"].ToString();

Int32 ID = Convert.ToInt32(jsonObj["MEMBERS"]["M"]);
string RI = jsonObj["MEMBERS"]["RI"].ToString();
string F = jsonObj["MEMBERS"]["F"].ToString();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900