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

Make a Loop Array or Bulk to Insert Dictionary with Multiple Values from a parsed Json string into a SQLite database with FMDB iOS. Objective C

I have a Parsed Json string in which I would like to loop the values and insert them into my FMDB Sqlite database. I can only put one record at a time in the database. i want to put all my records in the sqlite database. I know I have to make up…
Blake Loizides
  • 985
  • 2
  • 20
  • 43
0
votes
0 answers

Optimize SQLite query that has multiple parameters using FMDB

I have a query that starts pretty simple: SELECT zudf16, zudf17, zudf18, zudf19, zudf20, zitemid, zItemName, zPhotoName, zBasePrice FROM zskus WHERE zmanufacturerid=? AND zudf16=? ORDER BY zItemID As choices are made I build on it: SELECT zudf16,…
Slee
  • 27,498
  • 52
  • 145
  • 243
0
votes
1 answer

iOS sqlite/FMDB update not working

This isn't as easy and specific to ask as I'd like, but I'm really stuck with something. I followed this tutorial, recreating it very similar for an iPad…
Henry David
  • 441
  • 1
  • 5
  • 12
0
votes
1 answer

insert special character on SQLite with FMDB

I have an issue with inserting a value into table by FMDB. I have SQL string like this: NSString *sql = [NSString stringWithFormat:@"INSERT INTO table( COMPANY, PAGE_NO ) VALUES ('%@',%d,%d)",value1,value2,value3]; And I use FMDB like this for SQL…
Nhat Huy
  • 21
  • 3
0
votes
1 answer

Is possible to have [FMResultSet previous] and/or [FMResultSet goRecord:1]?

To use sqlite for populate UITableViews, I copy all the data to NSArrays/Dicts so I can travel back/forward on the list. However, this is wastefull and requiere to have the data twice. I wonder if is possible to have [FMResultSet previous] and/or…
mamcx
  • 15,916
  • 26
  • 101
  • 189
0
votes
2 answers

how to get grouped query data from the resultset?

I want to get grouped data from a table in sqlite. For example, the table is like below: Name Group Price a 1 10 b 1 9 c 1 10 d 2 11 e 2 10 f 3 12 g 3 10 h 1 11 Now I want…
chancyWu
  • 14,073
  • 11
  • 62
  • 81
0
votes
2 answers

FMDB Infinite loop due to sqlite3_step and while (retry)

I have a FMDB executeUpdate which cause an infinite loop : FMDatabase *db = [FMDatabase databaseWithPath:[CDDBManager getDatabasePath]]; [db closeOpenResultSets]; [db close]; NSLog(@"successfully pass closes"); [db open]; NSLog(@"successfully pass…
Thomas Leduc
  • 1,092
  • 1
  • 20
  • 44
0
votes
1 answer

db stringForQuery retrieve one column

When using FMResultSet to execute sql, we can use stringForColumn:@"ColumnName" to get the value. FMResultSet *cardInfoList =[db executeQuery:@"SELECT * FROM holder, cardInfo WHERE holder.userName = ? AND cardInfo.cardNum= holder.cardNum",…
user1132443
  • 71
  • 1
  • 5
0
votes
1 answer

Use FMDB for SQLite library how automatic update tableview like controllerDidChangeContent of Core Data

i'm using core data in my app, but i notice that is a bit slow and i have some crash of problems of inconsistency, maybe i have bad managed it, however i want pass to SQLite and i found the FMDB library, but my question is how i can automatically…
Piero
  • 9,173
  • 18
  • 90
  • 160
0
votes
2 answers

SQLite Not Importing Properly into iOS

It appears that when I copy a .sqlite3 file into iOS, and use FMDB to access it, the database is empty. I just drag and drop it into Xcode. When I run: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,…
darksky
  • 20,411
  • 61
  • 165
  • 254
0
votes
2 answers

Result does not return any data in FMDB

I am using this tutorial to implement FMDB in my project. But my code does not return any value. here is the code for retrive value. -(NSMutableArray *) getCustomers { NSMutableArray *customers = [[NSMutableArray alloc] init]; FMDatabase *db…
user2144055
0
votes
1 answer

FMDatabase.h not found when using route-me library

So im trying to use the route-me widget in my app, but xcode keeps complaining that it cant find FMDatabase.h, yet its included in the project (albeit under a different project that is included into my project). I've copied how a sample app has been…
Fonix
  • 11,447
  • 3
  • 45
  • 74
0
votes
2 answers

FMDB databaseWithPath: not writing to disk

The fmdb docs say that if you pass a file system path to databaseWithPath: it will create a file for you: A file system path. The file does not have to exist on disk. If it does not exist, it is created for you. I am getting my file system path…
Westley
  • 1,143
  • 14
  • 27
0
votes
3 answers

Xcode compare numbers from FMDB

I want to SELECT a record FROM database WHERE the 'balance' is bigger than the number you type. The regular sql is : SELECT cardNum FROM cardInfo WHERE balance > money ORDER BY withdrawals DESC, discount DESC. But I have no idea how to do it in…
user1132443
  • 71
  • 1
  • 5
0
votes
2 answers

Cannot insert in SQLITE database with FMDB wrapper

I'm new to IOS development so I am following this tutorial As mentioned in this tutorial I made my database using the SQLITE command line, created my tables and next imported the database in my XCode 4.6 Project by adding it to Supporting Files…