开发者

How to post data from Iphone to sqlserver

开发者 https://www.devze.com 2023-01-10 01:30 出处:网络
I want to post data from Iphone to Sqlserve开发者_开发问答r using WCF REST service.... In Iphone i have a dictionary(with 5 K-V pairs) &want to pass a single element of this dictionary

I want to post data from Iphone to Sqlserve开发者_开发问答r using WCF REST service.... In Iphone i have a dictionary(with 5 K-V pairs) & want to pass a single element of this dictionary (like Id )through webservice(Browser) ......& save all the other K-V pairs in Sqlserver corresponding to this Id using the method made in Wcf service. Plz Any help....................


Take a look at ASIHTTPRequest, which is a framework that makes it easy to issue POST requests to RESTful services.

EDIT

It looks like you have a JSON object. You can parse JSON into an NSDictionary using json-framework. There are numerous tutorials you can access through Google that explain how to parse JSON with json-framework.

Once you have your NSDictionary of key-value pairs, it is trivial to use ASIHTTPRequest to create a POST HTTP request. The code samples on ASIHTTPRequest's site explain how to create a POST request.

I'm not sure what WCF is, but so long as it understands POST requests, you should be able to use ASIHTTPRequest for talking with it.

Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消