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

Sqlite performance with 10000 of records in iPad

I'm using FMDB wrapper class for my iPad application. I'm having table which contains nearly 10000 records. Each record is having 140 fields. I'm using Modal class to store the retrieved values like, NSString *query = [NSString…
arthankamal
  • 6,341
  • 4
  • 36
  • 51
0
votes
3 answers

Objective-c FMDB SQLite insert withParameterDictionary and auto-increment key

I have an iOS app using FMDB library. There is a 7 field SQLite DB (1 autoincrement, 6 regular text fields). I am trying to execute [db executeUpdate:@"INSERT INTO messages VALUES (:field1,:field2,:field3,:field4,:field5,:field6)"…
selytch
  • 535
  • 2
  • 9
  • 24
0
votes
1 answer

ios fmdb error not inserting second time

Iam Using FMDb for inserting into sqlite database my code goes like this in first view controller: emp.questions = question; if ([finalArray count]==3) { emp.option0 = [finalArray objectAtIndex:0]; …
Naveen Pathiyil
  • 826
  • 1
  • 7
  • 8
0
votes
2 answers

Insertion to table fails with FMDB

I am trying to insert some values in my database in AppDelegate in Application didFinishLaunchingWithOptions however each time it fails to insert data. code NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,…
Saty
  • 2,563
  • 3
  • 37
  • 88
0
votes
1 answer

How to mock a class which calls an invokation block?

I'm digging myself into TDD and startet using SenTestingKit along with OCMock. I'm using FMDB as a wrapper for my SQLite Database. I can't get my head around how to mock the DatabaseQueue class, so it correctly invokes the invocation block with an…
Christoph Winkler
  • 6,278
  • 1
  • 18
  • 18
0
votes
2 answers

Download JSON data via NSJSONSerialization

I have a JSON string from PHP's json_encode(). This is how it looks in JSONViewer.stack.hu, and this is how it looks in the browser. Is it possible to use NSJSONSerialization to download the JSON data directly? If so, I am going to save the…
Jahm
  • 658
  • 1
  • 12
  • 27
0
votes
3 answers

unknown property attribute 'atomic'

When i use FMDB test demo in xcode4.2, everything is good. But when I run the demo in xcode 3.2.6, it gives the error:"unknown property attribute 'atomic'" __unsafe_unretained id _delegate; NSUInteger …
0
votes
2 answers

fmdb path and using db 2nd time from another viewController

I am using the code below to create db in one class and using it in the viewController and same code again in another class in newViewController . Is it correct ? Or does it create new db in its place or uses if there is an existing db ? or Do…
Jacob Wood
  • 467
  • 9
  • 26
0
votes
1 answer

Convert SQLite/FMDB NSArray format

Question about SQLite and FMDB, I'm going to save NSArray *insertParams into SQLite, the format of insertParams is like below: ( { action = "\U8d5e\U540c\U4e86\U8be5\U56de\U7b54"; content =…
Tom H
  • 517
  • 1
  • 6
  • 10
0
votes
1 answer

fmdb ios create and insert query

I am using this query to populate and create my table.But Its not creating the table and not inserting values.Using FMDB for ios.I am a noob in ios database and this is not working.Please guide me how should I make it work.Thanks in Advance. NSArray…
Jacob Wood
  • 467
  • 9
  • 26
0
votes
1 answer

FMDatabase query works with ? but fails with literal

This is an odd problem. I've found a workaround that works, but I'd like to understand why, because I suspect it will come up again later in my code. Here's the method that's giving my the problem: FMDatabase *cardDatabase // initialized…
chapka
  • 490
  • 1
  • 3
  • 11
0
votes
1 answer

SQLite - running on Device

FMDB runs great in the simulator, but I get the following errors when I try to run it on the device. "_sqlite3_step", referenced from: -[FMResultSet next] in FMResultSet.o -[FMDatabase executeUpdate:arguments:] in FMDatabase.o …
Jordan
  • 21,746
  • 10
  • 51
  • 63
0
votes
1 answer

Sqlite fmdb lib duplicates symbol for armv7

I get this error when trying to build on Xcode 4.5 based on iOS 6 SDK duplicate symbol _main in: …
nesimtunc
  • 849
  • 7
  • 28
0
votes
1 answer

query custom classes via FMDB

I am new with FMDB and sqlite. i want to know is it possible to query custom classes via FMDB. I cant understand the advantages of using FMDB over sqlite.. are there any added APIs and functionalities? Can anyone help me understand how to use the…
Preethi
  • 154
  • 14
0
votes
2 answers

sqlite3_prepare_v2 doesn't return taking too long (slow) and using memory

I have an iOS app, with a table that has 1500 records. I'm using FMDB, invoking the following form: FMDatabase *db = ... [db executeQuery:@"select num from a where b = ?", 6]; The table "a" has an index on "b". This runs fine in the simulator, but…
David
  • 2,770
  • 5
  • 35
  • 43