Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jbuilder

macrumors newbie
Original poster
Apr 23, 2010
2
0
Mesquite Texas
This is my first post.
...well the last time i did programming was in 1998, senior year in high school with turbo pascal. Sooo yeah. Completely new.
I got my iphone in June of last year and has been a great asset at work. But I thought to myself what if I could do a little more. So i thought of some ideas that would be great for an app and found myself purchasing my first programming book..... "Learn C on the Mac".
From what know, i have a long way to go.

But my basic app that i want to make would be a simple one...I think.
I want an app that can pull information from a database at work and would then display that info. Thats it.
Is it possible to do this using the iphone?
Would the information have to be on an Excel spreadsheet or Accel?

Any tips on my journey?
After finishing this book i plan on buying "Learn Objective-C on the mac" and then "Beginning iPhone Development"

jBuilder
 
iPhone/iPad can read databases. It has SQLite database built-in. Also you can use Core Data instead.

It depends on your needs. Alternatively you can read simple flat files (txt files). Read data over the web. Use xml files.

If you are just using an Excel or Access file, then just export as a CSV file (semicolon or comma delimited). From the CSV file, you can import or parse it depending on your need.

You can convert CSV files to SQLite database format with the SQLite browser tool. Available for both Mac or Windows here:
http://sourceforge.net/projects/sqlitebrowser/

Also there is a lot of sample code on reading data for iPhone. Be sure to browse the Apple developer site for them.

Just export your Excel or Access file in CSV format (a text file either semicolon or comma delimited), then import the CSV file into the SQLite browser tool and select file->import->table

Then read up on how to access a SQLite database with the iPhone/iPad. You'll have to be familiar with basic SQL commands too, which most beginner iPhone programming book will discuss, like the one you mentioned earlier.

Alternatively you can use Core Data instead of SQLite. You'll have to read up on that as well.

The book you mentioned, "Beginning iPhone 3 Development" does not cover Core Data. It's covered in the follow-up book, "More iPhone 3 Development" talks about Core Data.

If you are just looking for one book to cover Core Data and SQLite, "iPhone SDK Development" by Bill Dudney & Chris Adamson" covers it. It's a really good book. It talks about all the ways of reading data, from text files, SQLite, Core Data, etc.

Also the recently released "iPhone Programming: The Big Nerd Ranch Guide" covers SQLite, Core Data and more. I really am enjoying this book as it's written by Aaron Hillegass (and Joe Conway). Hillegass wrote the best Mac Programming book on Cocoa, and this is his latest book. I highly recommend it. It goes over a lot of Objective-C stuff that other books gloss over, like memory management, writing classes, etc.
 
If you want to read from a corporate database, then you'll need to know what it is (Oracle, etc), version, and access tools available to third party applications. Usually this involves some library to link with your application that allows you to login and and pass SQL queries.

The iPhone is just a wireless computer. With the tools available and an accessible wireless connection, you can do what you want.
 
If you are accessing the data remotely, rather than trying to connect to the database directly, I would probably write a script in PHP/Perl/etc to pull the data out of the database and convert it to something like XML.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.