Questions tagged [fmdb]

FMDB is a free, third-party Objective-C wrapper for SQLite, providing a simple, object-oriented interface for Mac OS X and iOS.

FMDB is a free, third-party Objective-C wrapper for SQLite, providing a simple, object-oriented interface for Mac OS X and iOS. FMDB isolates the Objective-C developer from the SQLite C interface and greatly simplifies the process of writing code that interacts with SQLite databases.

FMDB was developed by August "Gus" Mueller and is provided the public free of charge for use without restriction. See the LICENSE.

References

677 questions
0
votes
1 answer

How to use select statement with multiple where values in objc?

I don't think this is the correct format because the console stops at the nslog retrieving ownership results. Do i need to work around this? create a temp table to store the where for qr and then search for where user? or do can i just update my sql…
Jim Chen
  • 157
  • 1
  • 3
  • 11
0
votes
1 answer

How to selectively replace sqlite row?

In my case 2 I am trying to replace the later sqlite entry for the qrcode. I want to update the row with a new FBid. How do I select it and then replace it? Is it something to do with sqlite? or is there some logic I need to apply within my…
Jim Chen
  • 157
  • 1
  • 3
  • 11
0
votes
1 answer

Do I need to create a copy of the database file multiple times? or just once in the appdelegate?

What do I need to set up the database in my ios project? I know I have to make a copy of the database file but do I need to rewrite the same setup code in each view controller where I plan to actually retrieve and save data? NSArray *documentPaths…
Jim Chen
  • 157
  • 1
  • 3
  • 11
0
votes
1 answer

SQLite/FMDB performance issue when enabling Foreign Keys, on specific table

I have a table created with this command: CREATE TABLE "A" (`id` INTEGER PRIMARY KEY NOT NULL, `b_id` INTEGER NOT NULL REFERENCES B(id) ON DELETE CASCADE, `c_id` INTEGER NOT NULL REFERENCES C(id) ON DELETE CASCADE, `field1` INTEGER, `field2` TEXT…
0
votes
0 answers

Force Delete on a UNIQUE rows SQLite FMDB iOS

I have an app which uses SQLite, i have some problems deleting a row because one of its value is unique. I get the error : Unknown error calling sqlite3_step (19: column myField is not unique) DB Query: DELETE FROM "****" WHERE "myField" =…
user2335528
  • 161
  • 1
  • 3
  • 13
0
votes
1 answer

How can I use "read commited" isolation level in ios app using sqlite?

My ios application use FMDB framework to work with SQLite database. For updating database from server I use FMDatabaseQueue: - (BOOL)executeUpdate:(NSString *)update { FMDatabaseQueue *dbQueue = [FMDatabaseQueue…
Slavik
  • 84
  • 7
0
votes
1 answer

FMDatabase errors out when running update query

I have the below line which crashes on FMDB when it runs with: -[FMDatabase executeUpdate:error:withArgumentsinArray:orDictionary:orVAList:] My code is: NSInteger entryID = 1; [db executeUpdate:@"UPDATE formQue SET Processed='true' WHERE…
DevWithZachary
  • 3,545
  • 11
  • 49
  • 101
0
votes
1 answer

How to pass two queries in FMResultSet

I have written this code :- [database open]; NSString *stringQuery = [NSString stringWithFormat:@"SELECT email, firstName, id, lastName, phone FROM contacts WHERE id = '%@'", _stringID]; NSString *stringQuery2 = [NSString…
Gurpreet
  • 181
  • 6
0
votes
1 answer

FMDBResultset next goes to an infinite loop

Im Trying to become a result set of query using FMResultSet in objective-c - (NSMutableArray*) buildArrayArticlesWithArticleContainer: (CSTArticleContainer*)articleContainer andSearchString:(NSString*)searchString…
Fabi
  • 1
  • 1
0
votes
1 answer

iOS SQLite with FMDB keeps reporting 'out of memory' error while distributing adhoc build via TestFlight only

I'm using FMDB to work with SQLite on my latest iOS project (supports iOS SDK 7.0 & above). Everything is working like a charm during development & I love this wrapper. I've tested on simulator & directly build to device (my device is iPhone 5C &…
Thanh Nguyen
  • 161
  • 1
  • 10
0
votes
1 answer

Creating and opening database with FMDB(Objective-c Database Library)

I'm developing iOS App with FMDB(Database Library of using SQLite easily). For creating and opening a database, I'm writing down the following code. NSFileManager *manager = [NSFileManager defaultManager]; NSArray *paths = [manager…
supermonkey
  • 631
  • 11
  • 25
0
votes
1 answer

What's the correct way to use inDatabase: within an async networking call?

I'm using AFNetworking along with FMDB to remove database rows from an array when I make a successful POST to a server. My problem at the moment is that my logging shows that I'm skipping every second item in the array, so I think I've incorrectly…
jonalmeida
  • 1,206
  • 1
  • 9
  • 24
0
votes
1 answer

FMDB: Does calling a method to make a query in the inDatabase block work the same way?

I'm trying to remove some database records, and I have a wrapper class around my FMDB class. What I'm wondering, is if I can call this class method from the inDatabase block? [_dbQueue inDatabase:^(FMDatabase *db) { // Do some magic here to get…
jonalmeida
  • 1,206
  • 1
  • 9
  • 24
0
votes
1 answer

Custom SQLite collation not firing

I'm trying to implement diacritic insensitive lookups in my SQLite database (on iOS). From what I've read, creating my own collation is the way to do this (please suggest alternatives if there are any). I've implemented the following: static int…
Ricky
  • 3,101
  • 1
  • 25
  • 33
0
votes
1 answer

UICollectionView performance with FMDB

i'm using a UICollectionView to render a list of contacts, all coming from a contacts table in the DB. For each item, i am running a query to FMDB that returns one contact, like this: __block CTVSimpleContact *simpleContact = [CTVSimpleContact…
albertosh
  • 2,416
  • 7
  • 25
  • 32