Cannot commit in sqlite using a wrapper

Posted by user271753 on Stack Overflow See other posts from Stack Overflow or by user271753
Published on 2010-05-05T09:34:02Z Indexed on 2010/05/05 9:38 UTC
Read the original article Hit count: 202

Filed under:
|
|
|
    - (IBAction)SetupButtonPressed:(id)sender 
     {

Sqlite *sqlite = [[Sqlite alloc] init];
NSString *writableDBPath = [[NSBundle mainBundle]pathForResource:@"Money"ofType:@"sqlite"];
    if (![sqlite open:writableDBPath])
   return;
[sqlite executeNonQuery:@"CREATE TABLE test (key TEXT NOT NULL, num INTEGER, value TEXT);"];


 }

Hey guys the above code runs at first but the next time , the table does not exists in the database ! I am using http://th30z.netsons.org/2008/11/objective-c-sqlite-wrapper/ what am I doing wrong ?

Or could you please suggest me a really simple tutorial for core data ?

© Stack Overflow or respective owner

Related posts about core-data

Related posts about sqlite