Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8236323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:05:58+00:00 2026-06-07T19:05:58+00:00

I have an iPad application that uses table view controllers to present lists of

  • 0

I have an iPad application that uses table view controllers to present lists of data. I want to connect these tables to data in a SQL Server. I have very little experience in this realm of programming and I am not sure where to begin. In the long run I’d like adding/editing/deleting data on the app to sync with the server as well. I understand that this is a very broad question, so I am mainly looking for suggestions to help me get started. I, for example, do not want to start researching and learning Core Data if it is not the framework that can accomplish my goal.

In short, how can I connect my application to a SQL Server so that I can access its data and sync it to a device? Any example code/walkthroughs would be much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T19:05:59+00:00Added an answer on June 7, 2026 at 7:05 pm

    I am currently working in an iOS application that requires this same functionality. For mySQL database queries on the server, I am using server-side PHP scripts that can accept variables, such as the table name or database search term.

    What I do is I make an HTTP GET request using objective-C’s NSMutableURLRequest, then have the server process the request (in PHP), and then return the database query results to my application in JSON format. I use SBJsonParser to parse the returned data into an NSData, and then an NSArray object.

    An example of making an HTTP request in Objective-C:

    NSString *urlString = [NSString stringWithFormat:@"http://website.com/yourPHPScript.php?yourVariable=something"];
    NSURL *url = [NSURL URLWithString: urlString];
    
    NSMutableURLRequest *request1 = [[NSMutableURLRequest alloc] initWithURL:url];
    
    /* set the data and http method */  
    [request1 setHTTPMethod:@"GET"];
    [request1 setHTTPBody:nil];
    
    /* Make the connection to the server with the http request */
    [[NSURLConnection alloc] initWithRequest:request1 
                                    delegate:self];
    

    There is more code that you need to add to actually respond to the request when it returns, and I can post an example of that if you would like.

    I actually dont know if this is the best way to do this, but It has worked for me so far. It does require that you know PHP though, and I don’t you if you have any experience with it.


    UPDATE:

    Here is some sample code showing how to respond to the request. In my case, since I am getting a JSON encoded response, I use the SBJsonParser to parse the response.

    - (void)connectionDidFinishLoading:(NSURLConnection *)connection
    {
        /* This string contains the response data.
         * At this point you can do whatever you want with it 
         */
        NSString *responseString = [[NSString alloc] initWithData:receivedData
                                                         encoding:NSUTF8StringEncoding];
    
        /* Here I parse the response JSON string into a native NSDictionary using an SBJsonParser */
        SBJsonParser *parser = [[[SBJsonParser alloc] init] autorelease];
    
        /* Parse the JSON into an NSDictionary */
        NSDictionary *responseArr = [parser objectWithString:responseString];
    
        /* Do whatever you want to do with the response */
    
        /* Relsease the connection unless you want to re-use it */
        [connection release];
    }
    

    Also add these methods, assuming you have an NSMUtableData instance variable titled receivedData.

    - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
    {
        [receivedData setLength:0];
    }
    
    - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
    { 
        [receivedData appendData:data];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iPad application that pulls in all of its data from an
I'm making an application for the iPad. I have a view controll that has
I have an iPad application that uses the whole screen (that is, UIStatusBarHidden is
I have an iPad Split View Application that brings up a modal view to
I have a PhoneGap application I am developing for iPad that uses video extensively,
I have an iPad application that can be used in all four view modes
I have an iPad application that uses WebViews to display a list of URL's.
I have an iPad application (a tuner) that uses Core Audio Audio Units. It
I have ipad application which has 3 tableviews with holds data like label,image,property lists
I have a phonegap application targeting iPad that needs to embed a video on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.