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

FMDB sqlite cannot update table on device but can update on simulator

I am new in iOS app. In my iPhone app, I have a database type sqlite (data.sqlite) and some tables in there (just call table: A, B, C,...) I got the problem when I try to update data to tables: table A can update successfully on simulator and iPhone…
Bentley
  • 143
  • 10
0
votes
1 answer

Deleted FMDB bridge file causes error in project navigator

I have applied FMDB database wrapper in my project. I added FMDB bridging files in a Group folder named "FMDB" in my project navigator. "FMDB" folder also had "myprojectname-Bridging-Header.h" file. Accidentally i deleted the "FMDB" folder from my…
Nuibb
  • 1,800
  • 2
  • 22
  • 36
0
votes
2 answers

SQLite id field - autofill

I've added a new table to my DB: CREATE TABLE myTable ( myId ID NOT NULL, aNumber INTEGER NOT NULL, anUniqueTextId TEXT NOT NULL, aText TEXT, PRIMARY KEY(myId, anUniqueTextId) ON CONFLICT IGNORE, FOREIGN KEY(anUniqueTextId, aNumber) REFERENCES…
Nat
  • 12,032
  • 9
  • 56
  • 103
0
votes
1 answer

Avoid retain count with __block variable with block method like in FMDatabaseQueue

i'm using FMDatabaseQueue, and i don't want retain count using __block variable, because i have a method with a return value, that is the result of the read of the database, this is an example: - (BOOL)existProduct:(int)id_product { __block BOOL…
Piero
  • 9,173
  • 18
  • 90
  • 160
0
votes
0 answers

FMDB multiple database query

Is it possible to get "Select" query from multiple database in FMDB ? my program have a lots of database with same schema but different data and name. user can download these databases and adding them to document folder. now i want to get query from…
Ahad Porkar
  • 1,666
  • 2
  • 33
  • 68
0
votes
1 answer

SQLite or FMDB is not able to find rows with certain characters

I am having an issue where I am trying to insert rows into a db only if they do not exist. If I inset certain characters, FMDB or SQLite is barfing and assuming each row is new: I expect each set to insert the first record, and then update…
JeremyLaurenson
  • 979
  • 2
  • 11
  • 23
0
votes
0 answers

FMDatabaseQueue How To Return A Value in Swift

Please refer to the answer of FMDatabaseQueue How To Return A Value. It said the function just return the value at the end of the function. But my code in swift doesn't work this way. Here is my code: class func isSomethingRight()-> Bool { var…
Bagusflyer
  • 12,675
  • 21
  • 96
  • 179
0
votes
1 answer

FMDB syntax error when updating database with join statement

I am trying to update a column in following db; create table movies(id integer primary key AUTOINCREMENT, imdb_id varchar(60) UNIQUE, title varchar(100), plot varchar(1000),poster varchar(1000),rating real, predicted_rating real, year integer,…
SpaceDust__
  • 4,844
  • 4
  • 43
  • 82
0
votes
0 answers

Why Is This FMDB Enqueue Block Not Executing?

I've created this method in my iOS to call to FMDatabaseQueue: -(void) enqueueSelectStatement:(NSString*)selectStatement withArguments:(NSArray*)args { NSLog(@"Checkpoint 1"); [self.dbQueue…
Chris
  • 5,485
  • 15
  • 68
  • 130
0
votes
1 answer

Migrating SQLCipher ver. 2.x DB to ver. 3.x using by FMDB

I saw the following page and I understand I should execute the query "PRAGMA cipher_migrate". https://www.zetetic.net/sqlcipher/sqlcipher-api/#cipher_migrate But I have no idea how to use it on FMDatabase. The following code did not work... (Seems…
cafedeichi
  • 745
  • 1
  • 10
  • 25
0
votes
1 answer

Using FMDB with Multiple View Controllers in IOS

I have an iOS app structured more or less like so: Controller1/View1 Controller2/View2 Controller3/View3 Controller4/View4 Is it ok to instantiate a FMDatabase for each of the controllers, even if those databases all point to the same…
Andrew Stromme
  • 2,120
  • 23
  • 30
0
votes
0 answers

iOS: FMDB Error on insert only on device

I am using SQLite via FMDB in my app, and it's been working for the past couple months on all the XCode simulators, however, when I am now testing on an actual device, I seem to be getting problems when I try to insert. The error I'm getting…
user1513171
  • 1,912
  • 6
  • 32
  • 54
0
votes
1 answer

FMDB not insert NSData into table

I'm trying to add some datas from NSDictionary/NSArray into my database. My project use sqlite/FMDB to do it. But I get some problem: I can't save NSData into my database. Here is my code: - (void)startSaveDB { NSFileManager *fileManager =…
TienLe
  • 614
  • 2
  • 9
  • 33
0
votes
1 answer

Can't read data using FMDB

I'm using FMDB. I create and insert into table. It works fine. idx INTEGER NOT NULL DEFAULT 0 PRIMARY KEY AUTOINCREMENT topicId Varchar NOT NULL listChat BLOB NOT NULL But I can't get all data from listChat collumn. Here is my code: -…
TienLe
  • 614
  • 2
  • 9
  • 33
0
votes
1 answer

ios: Sqlite with fmdb inserts not persisting on simulator when turn off computer

I'm using fmdb (https://github.com/ccgus/fmdb) to insert data into sqlite. I'm talking directly to sqlite instead of using Core Data just because I feel it gives me more flexibility in my queries and I'm good at SQL so it's easy for me. The problem…
user1513171
  • 1,912
  • 6
  • 32
  • 54