• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Why doesn't this work on my device?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why doesn't this work on my device?


  • Subject: Re: Why doesn't this work on my device?
  • From: James Cicenia <email@hidden>
  • Date: Fri, 27 Feb 2009 11:07:20 -0600

ARrrgh...

The database exists but it contains nothing?! I double checked it in my trusty firefox sqlite extension, and everything is there.
Is there some magic "touch" I need to do to get the tables properly into the device? I have cleaned my project, restarted xcode, rebuilt, etc.


thanks

James


On Feb 27, 2009, at 10:55 AM, Bill Bumgarner wrote:

On Feb 27, 2009, at 8:44 AM, James Cicenia wrote:
Don't use UTF8String to get a C string for a file system path, you should use -fileSystemRepresentation.
I don't even know what that is?


It is documented-- google, Xcode's documentation window, or developer.apple.com will quickly fulfill your curiosity:


http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#/ /apple_ref/occ/instm/NSString/fileSystemRepresentation

(Sorry to be harsh -- but "RTFM" is something we all fail to do far too often and I'm singly you out to remind me to do the same :)

if (sqlite3_open([path UTF8String], &database) == SQLITE_OK) {
const char *sql = "SELECT type, subtype, name, id FROM ProduceItem ORDER BY name";
sqlite3_stmt *statement;
if (sqlite3_prepare_v2(database, sql, -1, &statement, NULL) == SQLITE_OK) {

You can grab more error information by doing something like:

NSLog(@"Oops %s", sqlite3_errmsg(database));

If it says that the table doesn't exist then the database isn't being correctly installed (or correctly initialized).

b.bum




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Why doesn't this work on my device?
      • From: Bill Bumgarner <email@hidden>
References: 
 >Why doesn't this work on my device? (From: James Cicenia <email@hidden>)
 >Re: Why doesn't this work on my device? (From: Jason Foreman <email@hidden>)
 >Re: Why doesn't this work on my device? (From: James Cicenia <email@hidden>)
 >Re: Why doesn't this work on my device? (From: Bill Bumgarner <email@hidden>)
 >Re: Why doesn't this work on my device? (From: James Cicenia <email@hidden>)
 >Re: Why doesn't this work on my device? (From: Bill Bumgarner <email@hidden>)
 >Re: Why doesn't this work on my device? (From: James Cicenia <email@hidden>)
 >Re: Why doesn't this work on my device? (From: Bill Bumgarner <email@hidden>)
 >Re: Why doesn't this work on my device? (From: James Cicenia <email@hidden>)
 >Re: Why doesn't this work on my device? (From: Michael Ash <email@hidden>)
 >Re: Why doesn't this work on my device? (From: James Cicenia <email@hidden>)
 >Re: Why doesn't this work on my device? (From: Bill Bumgarner <email@hidden>)
 >Re: Why doesn't this work on my device? (From: James Cicenia <email@hidden>)
 >Re: Why doesn't this work on my device? (From: Bill Bumgarner <email@hidden>)
 >Re: Why doesn't this work on my device? (From: James Cicenia <email@hidden>)
 >Re: Why doesn't this work on my device? (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: Why doesn't this work on my device?
  • Next by Date: Re: OutlineView with custom TableColumn cell doesn't redisplay when losing focus
  • Previous by thread: Re: Why doesn't this work on my device?
  • Next by thread: Re: Why doesn't this work on my device?
  • Index(es):
    • Date
    • Thread