Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-28-2010, 09:21 AM   #1 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 83
Default sqlite on the device

I have a major issue with sqlite3.

On the iPhone simulator it works fine, albeit the iphone simulator caching the DB so I can't actually test if my app is responding to dynamic data in the sqlite DB.

But on the device it seems that I can't even get the database working.

I am doing a simple select query, and as I've said, the iPhone sim. is fine but the device doesn't go into the statements after:

Code:
if(sqlite3_prepare_v2(database, [sql UTF8String], -1, &compiledStatement, NULL) == SQLITE_OK)
So I'm guessing that database wasn't set up properly on the device ?

What are the differences between the device and simulator for the sqlite database ?
djp_phillips is offline   Reply With Quote
Old 02-28-2010, 08:51 PM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Jan 2010
Location: Issaquah, WA
Age: 41
Posts: 1,184
Default

You are probably just not creating your database in the proper location. On the device, it needs to be somewhere in the app's documents directory, whereas on the simulator it will work just about anywhere.
__________________
Recall It! Tag your notes. Tag your photos. Tag your thoughts. Tag your life.

Recall It! for iPad

http://www.dljeffery.com
dljeffery is offline   Reply With Quote
Reply

Bookmarks

Tags
device, simulator, sqlite, sqlite3

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 269
20 members and 249 guests
@sandris, AdamL, ADY, Dani77, diyora, FAED, F_Bryant, GHuebner, HDshot, headkaze, mer10, Oral B, prchn4christ, Rudy, smithdale87, Thompson22, timle8n1, Touchmint, twerner, vigu360
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,880
Threads: 89,228
Posts: 380,750
Top Poster: BrianSlick (7,129)
Welcome to our newest member, @sandris
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:58 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0