My web service is made to access data in a table from a SQL Server. The web service has a method that returns the first 25 rows of data as a DataSet. Can I use this DataSet class or do I need the method to return XML?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You cannot return a DataSet as Cocoa will not recognize it as an object considering it to be either an NSData binary or trash value. You need a method that returns an XML and a custom XML parser if you’re using some sort of legacy API.
The best solution is to use JSON data format to return the concrete values. After the request has been made and values have been returned, you can parse them into a convenient NSArray or NSDictionary depending on the data format via SBJSON parser.