Reputation: 41
I wanted to know the procedure to connect to SQL Database from an iPhone app. The read and write procedure to the SQL database and syncing it with iPhone's local database which is in sqlite, so that any changes in SQL database/sqlite database should be reflected on both.
Upvotes: 0
Views: 2763
Reputation: 11
The above answers are lacking. If you want to connect directly to a SQL sever from an iOS device you can use freeTDS. There are several compiled version that run on iOS. It is not as difficult as drag and drop developers would lead you to believe.
Cross compiling FreeTDS to iPhone
Upvotes: 1
Reputation: 1625
High level summary:
You would use the ASIHTTP library from the iPhone to make a REST call to your hosted php files. The "sync" logic would be in your hosted php files and on the iPhone callbacks that are receiving the data.
Keep in mind this is a very simplified overview, but I think its enough to get the ball rolling.
Upvotes: 0
Reputation: 2741
Firstly ios dosent support sql database.
If you have sql database on webserver, then you have to create webservices to perform CRUD operations.
Here is simple tutorial for webservices in ios http://www.techrepublic.com/blog/ios-app-builder/ios-tutorial-part-1-creating-a-web-service/
Upvotes: 0