Re: Cant read second table from same sqlite database iphone

2010-04-11 Thread charisse napeÿfffff1as
Farmer To: charisse napeÿf1as Cc: cocoa-dev@lists.apple.com Sent: Monday, April 12, 2010 4:10:21 Subject: Re: Cant read second table from same sqlite database iphone On 10 Apr 2010, at 18:02, charisse napeÿf1as wrote: >//get the name and the score >

Re: Cant read second table from same sqlite database iphone

2010-04-11 Thread Andrew Farmer
On 10 Apr 2010, at 18:02, charisse napeÿf1as wrote: >//get the name and the score >int iDen = sqlite3_column_int(statement, 0); >NSString* name = [NSString stringWithUTF8String:(char > *)sqlite3_column_text(statement, 0)]; Surely column 0 cannot be both an

Re: Cant read second table from same sqlite database iphone

2010-04-11 Thread Ben Trumbull
ess = [fileManager copyItemAtPath:dbPath toPath:databasePath > error:&error]; > > if (!success) > NSAssert(0,@"Failed to copy Database!\n"); > } > > > From: Ben Trumbull > To: cnape...@yahoo.com > Cc: Cocoa dev > Sent: Sunda

Re: Cant read second table from same sqlite database iphone

2010-04-11 Thread Jens Alfke
On Apr 10, 2010, at 6:02 PM, charisse napeÿf1as wrote: > I get nothing You get result codes from each sqlite API call at least. What are they? What happens if you run the second piece of code without having run the first one? Experiment. At a higher level, consider using an existing, alre

Re: Cant read second table from same sqlite database iphone

2010-04-10 Thread charisse napeÿfffff1as
ll To: cnape...@yahoo.com Cc: Cocoa dev Sent: Sunday, April 11, 2010 9:27:46 Subject: re: Cant read second table from same sqlite database iphone > Hello All, > > I am having trouble reading the second table from my database because it > returns nothing even if there is data inside

re: Cant read second table from same sqlite database iphone

2010-04-10 Thread Ben Trumbull
> Hello All, > > I am having trouble reading the second table from my database because it > returns nothing even if there is data inside it. How do you know it has data inside it ? A common mistake is to try to write to databases in the read only part of an application's sandbox on the iphone.

Cant read second table from same sqlite database iphone

2010-04-10 Thread charisse napeÿfffff1as
Hello All, I am having trouble reading the second table from my database because it returns nothing even if there is data inside it. I have a function below - (NSMutableArray*) getRegions { NSMutableArray * data = [[NSMutableArray alloc] init]; const char * sql = "SELECT * FROM Regions