views:

44

answers:

2
A: 

Try FMDB

Download the lib package and take a look in the example file included.

FelipeOliveira
+2  A: 

FMDB is here: http://github.com/ccgus/fmdb/tree/master/src/

The sample you are looking for is also on that page; the sample is "fmdb.m".

Graham Perks
+1 for the link
Dave DeLong
In the example, no have a example about query to delete. Just have to insert, update and create a new table.
Pass your DELETE to executeUpdate, like the example's INSERT and CREATEs.
Graham Perks
I tryed this and not worked: NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; FMDatabase* db = [FMDatabase databaseWithPath:@"/quickdatabase.db"]; [db open] [db setShouldCacheStatements:YES]; [db executeUpdate:@"delete from Enquetes where Nome = ?", [arrayAsk objectAtIndex:indexPath.row]]; [db close]; [pool release]; return 0;
=[db setShouldCacheStatements:YES]= is experimental, so try without that. At this point I would triple-check the arrayAsk content; try the SQL with a hard-coded value. What exactly is failing? Check for errors Do you have write access to that file? Try adding =FMDBQuickCheck([db hadError]);= to check for errors.
Graham Perks