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
3
votes
1 answer

FMDB: SQLite Statement ORDER BY orders diacritics incorrectly

I am very new to iOS development and there is a lot for me to learn. It is like a huge mountain, but thanks to all your help I am getting places ;) I have started an Xcode Project (Xcode Version 6.1.1, Swift, iOS) and included FMDB to run SQLite…
Claus Wolf
  • 141
  • 6
3
votes
1 answer

Difference between FMDB.database.beginTransaction and FMDB.databaseQueue.inTransaction

CODE A FMDBDatabase *db = xxxxx [db beginTransaction]; [db executeUpdate:xxxx]; xxxxxxx CODE B FMDBDatabaseQueue *queue = xxxxx [queue inTransaction:^{xxxxxx}] What is the difference between database.beginTransaction and…
debuggenius
  • 449
  • 5
  • 15
3
votes
1 answer

FMDatabaseQueue Error: database is locked

I have a method that runs in a background thread, and so (as I understand it) I need to use FMDatabaseQueue to safely and reliably access my SQLite database. I'm doing a query to check for the presence of a record, after which I immediately UPDATE…
Clifton Labrum
  • 13,053
  • 9
  • 65
  • 128
3
votes
1 answer

Foreign keys in FMDatabaseQueue

so I'm using FMDB library, and I would like to enable foreign keys which is done via [db executeQuery:@"PRAGMA foreign_keys=ON"]; But I'm using FMDatabaseQueue, initialised like this -(FMDatabaseQueue*)queue { if (_queue == nil) { …
beretis
  • 899
  • 1
  • 9
  • 24
3
votes
1 answer

Correct parameter binding for SELECT WHERE .. LIKE using fmdb?

First time user of fmdb here, trying to start off doing things correctly. I have a simple single table that I wish to perform a SELECT WHERE .. LIKE query on and after trying several of the documented approaches, I can't get any to yield the correct…
Chris
  • 3,445
  • 3
  • 22
  • 28
3
votes
1 answer

How to change the Maximum Depth Of An Expression Tree of SQLite with FMDB SDK?

I am using FMDB to implement a SQLite based apps, which I need to insert a large amount of data into SQLite, say 1000 rows of data, but I dont want to insert them one by one, I just want to do this with a single query, this make the insert progress…
Man Lung Chan
  • 79
  • 1
  • 7
3
votes
1 answer

Rounding issus insert NSDecimalNumber into Sqlite

the NSDeciamlNumber 3.33 becomes 0.32999999999999996 when it insert into database The the sql is correct, but the data become 0.32999999999999996 when sql execute. I'm using FMDB, I tried column type REAL, DECIMAL, they have same issue. If there a…
allenwei
  • 4,047
  • 5
  • 23
  • 26
3
votes
1 answer

How To Create or Stabiles relationship between two tables in FMDB?

I'm new with iOS Development and i'm also new with SQLITE database. I used FMDB as a wrapper in my project and i have two tables 1) ParticepentsTable and 2) ExerciseTable. ParticepentsTable contains 4-Rows like Id, Name, Gender and Exercise_Id and…
Amit Aman
  • 108
  • 12
3
votes
1 answer

Deleting a UITableViewCell from UITableView

I am using fmdb to manage some data that is display on a regular UITableView. I am attempting to delete one cell using this code: - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle…
Paulius Dragunas
  • 1,702
  • 3
  • 19
  • 29
3
votes
1 answer

Memory Leak in FMResultSet - FMDB

I am using FMDB in my project and I have profiled my project using Instrument for Memory leaks. I have found out many leaks in this function of FMResultSet class. The leaks are at this line: return [NSString stringWithUTF8String:c]; Can anyone…
Salman Zaidi
  • 9,342
  • 12
  • 44
  • 61
3
votes
1 answer

print prepared statements with fmdb

Is there any way to print the prepared statements, or at least implement the sqlite3_trace function when using fmdb? trying to access the statement from the FMResultset didn't work.
peko
  • 11,267
  • 4
  • 33
  • 48
3
votes
3 answers

FMDB & SQLCipher not encrypting

In Xcode I am trying to get FMDB to use SQLCipher to encrypt a database. In my project I already have a compiling version of SQLCipher which I already have proved is working via sqlite3 calls. I have a unit test that creates the database and 1…
Gooshy
  • 101
  • 1
  • 6
3
votes
1 answer

Rejected by apple due to the sqllite db in documents folder

I have sqlite db using FMDB wrapper that puts the db in documents folder on launch. User can also upload files through itunes in documents folder. But appstore rejected the app as following: When file sharing is enabled, the entire Documents folder…
3
votes
1 answer

FMDB: error 14, unable to open database file

Currently I am using the FMDB wrapper for my iPhone app. My problem is that after executing 2000 SQL insert statements (out of 5000 to 8000 sql statements), I get the following error: "error 14, unable to open database file" Can anyone help me to…
Nikh1414
  • 1,238
  • 2
  • 19
  • 35
3
votes
2 answers

Encrypting db for SQLCipher Issues

I'm having problem with creating a new encrypted db. I've done research regarding about this and these are some solutions that I have tried. Using terminal based on http://sqlcipher.net/design/ sqlite3 sqlcipher.db sqlite> PRAGMA…
user774150
  • 962
  • 2
  • 10
  • 24