0
- (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);"];
}
嘿傢伙上面的代碼首先運行,但下一次,表不存在數據庫! 我正在使用http://th30z.netsons.org/2008/11/objective-c-sqlite-wrapper/ 我做錯了什麼?不能在sqlite中使用封裝提交
或者你能否給我推薦一個非常簡單的核心數據教程?