4 Replies - 1021 Views - Last Post: 14 March 2011 - 07:25 AM

#1 therabbitfactory  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 14-March 11

SQLite - Retrieving a random field and placing in a text view (Objecti

Posted 14 March 2011 - 05:35 AM

Hi all

I need help!

I am building a seeming simple application that when the user shakes there handset a random statement appears in a text field, then when they reshake another appears.

I have decided that the best way to store the data is in a SQLite DB. I have imported the relevant frameworks and imported the database. The database contains two fields (ID, Text).

Can some please explain how I can get the random 'Text' field from the database and into the text view.

I am a complete noob so the more detailed the response the better :)

Thanks in advance for your help :)

This post has been edited by therabbitfactory: 14 March 2011 - 05:36 AM


Is This A Good Question/Topic? 0
  • +

Replies To: SQLite - Retrieving a random field and placing in a text view (Objecti

#2 janotte  Icon User is offline

  • code > sword
  • member icon

Reputation: 990
  • View blog
  • Posts: 5,141
  • Joined: 28-September 06

Re: SQLite - Retrieving a random field and placing in a text view (Objecti

Posted 14 March 2011 - 05:41 AM

What 'handset' are you talking about?

Have you got any code at all to share with us?

Context! We need context.
Was This Post Helpful? 0
  • +
  • -

#3 therabbitfactory  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 14-March 11

Re: SQLite - Retrieving a random field and placing in a text view (Objecti

Posted 14 March 2011 - 05:44 AM

View Postjanotte, on 14 March 2011 - 05:41 AM, said:

What 'handset' are you talking about?

Have you got any code at all to share with us?

Context! We need context.


Hi

Sorry, Its a Iphone and well basically the user shakes the phone to recieve a random fact (just the one) on screen in a text view.

Edit: Sorry I have no code as yet other than the using the shake gesture to change a text view to a defined string.

This post has been edited by therabbitfactory: 14 March 2011 - 05:45 AM

Was This Post Helpful? 0
  • +
  • -

#4 janotte  Icon User is offline

  • code > sword
  • member icon

Reputation: 990
  • View blog
  • Posts: 5,141
  • Joined: 28-September 06

Re: SQLite - Retrieving a random field and placing in a text view (Objecti

Posted 14 March 2011 - 06:05 AM

Here are some tutorials to get you started
http://iphonetuts.co...ta-as-required/

http://www.lynda.com...OS/77702-4.html

http://www.techotopi...one_Application

When you know enough of the basics to ask specific questions don't hesitate to ask.

Probably better to post in the Objective C forum to maximise the chance people know that that is the language you are writing in.
Was This Post Helpful? 0
  • +
  • -

#5 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6106
  • View blog
  • Posts: 23,653
  • Joined: 23-August 08

Re: SQLite - Retrieving a random field and placing in a text view (Objecti

Posted 14 March 2011 - 07:25 AM

Moved to Objective-C
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1