Can not update a field in the FMDB database using SWIFT

Here is my function in which I am trying to update a field count in my table. But it is not updating the value. Query is 100% fine as I have already tried it in external database software. May be I am using wrong function to execute my statement? fun

Looping through NSArray

I'm having troubles looping through a NSArray. Here's my code db = [[BrowserController currentBrowser] databaseOutline]; int rowNumber = [db numberOfRows]; int i = 0; if (rowNumber > 0 && i <= rowNumber) { while ([resultSet next]) { NSDictio

Locked FMDatabase database

So, I created an app that stores some data. However, every time, after I've called the delete function I wrote, and then call a different function, I get an error saying database locked. This is the function: + (void)deleteRestaurants:(NSString *)num

Swift - Pre-filled SQLite database not included on the device

I am trying to include a pre-populated SQLite database (with FMDB wrapper) in a build to my physical iPhone. However, the pre-populated database is not being included in the build to the physical device. Note that it works fine in the IOS Simulator,

SQL query via an imported database

So I have imported a pre-made SQLite database into my application and according to the path set (that you see in the picture labeled "ThePath") the application can open the database. I imported the database by just dragging and dropping it into

Swift and SQLite

I am following a tutorial on using SQLite on Swift, everything is working fine (the code is below). I am confusing about the database itself. I would be grateful if an expert could clarify the following questions to me: 1- I want the database to be p

FMDB in the project OSX Swift - & gt; Many mistakes

I've added FMDB in my Swift project and followed the FMDB Swift instructions (i.e. copy relevant .h/m. files and create the bridging header incl. import statement). When I try to compile I get a truckload of errors, all of them Apple Match-O-Linker e

Select SQLite data

Here is my code, and error is visible also: In SQLite Manager from Mozzila Firefox - all queries work fine which means that DB is correct Maybe someone can piont me out what is wrong with my code? EDIT: My code: NSArray *paths = NSSearchPathForDirect

FMDB and encryption

I'm using FMDB to work with sqlite and I'd prefer to avoid a dependency on SQLCipher. How can I simply leverage the DataProtection capability built into iOS? Is this possible - the only requirement is to protect the data in the event of the phone bei

how to get grouped query data from the result set

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 get all data grouped by the Group column, each group in one array, namely arra

insertion in the table fails with FMDB

Hi all I am trying to insert some values in my database in AppDelegate in Application didFinishLaunchingWithOptions however each time it fails to insert data. Please help me out. code NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDir

sqlite sum () in nsinteger

I want to build a function which takes the sum of all rows in a column called hours. it should then return an integer value, which i am going to use to multiply with another number. -(NSInteger)calculateTotal{ FMDatabase *dbHandler = [FMDatabase data

I do not know how to encrypt the database using SQLCipher

I have included SQLCipher into my project exactly like explained in this link: http://sqlcipher.net/ios-tutorial/ But I am not sure how to encrypt the database I have read description from above link but not getting. Actually what I am doing is if ap

FMDB: Linker Command Failed with Exit Code 1

I try to use FMDB Database but I've got an error : Undefined symbols for architecture i386: "_OBJC_CLASS_$_FMDatabase", referenced from: objc-class-ref in MainViewAppDelegate.o ld: symbol(s) not found for architecture i386 clang: error: linker c

How to enable foreign keys in FMDatabase?

Just stumbled upon the fact foreign keys are disabled by default in sqlite. I have "on delete casdade" foreign key and deleting parent table records does not delete child records. Various posts indicate you need to enable that on each connection

Error while using SQLite wrapper FMDatabase

I'm having trouble when I try to use FMDatabase. I have added theese files: FMDatabaseQueue FMDatabaseAdditions FMDatabase FMResultSet FMDatabasePool ..and I have also added the libsqlite3.dylib library and imported FMDatabase.h, but as soon as I unc

FMDB and LIKE clause

I'm having trouble getting the FMDB wrapper for iOS to work with a parameter and a LIKE clause. In fact I'm having trouble getting the LIKE clause to work at all on SQLite with FMDB. I've tried using `Name LIKE '%dam%' to match "Adam", and I've

Run the FMDB processes on the same background thread?

I am having problems using fmdb to read and write data into the same database. There are instances in my app where 1 class would write data into the database on the background thread while another class would read data from the same database on the m

EXC_BAD_ACCESS when using SQLite (FMDB) and threads on iOS 4.0

I am using FMDB to deal with my database which works fine. The app uses a background thread which is doing some work and needs to access the database. At the same time the main thread needs to run some queries on the same database. FMDB itself has a