Questions tagged [ios-sqlite]
10 questions
1
vote
0 answers
Sqlite insertion takes lot of time
This is one insertion function I am using :
- (void)CreateActivities:(NSMutableArray*)arrActivities{
for(Activity *activity in arrActivities)
{
if(![self ActivityExists:activity.ActivityId])
{
…

Nitish
- 13,845
- 28
- 135
- 263
1
vote
1 answer
Facing memory issue while Recursively inserting and updating data in database in swift
I'm inserting and updating more than 100000 data in database. I'm using libsqlite3 framework.
Issue: I'm facing is for each insertion memory increase to 4-5 mb and never gets released. Any better solution?
class DataBase{
let COMPANY_TABLE_NAME =…

Nitisha Sharma
- 239
- 4
- 14
1
vote
0 answers
How to replicate data from table of one database to table in another database atomically in SQLite in iOS Objective-C
I have tried to prepare sqlite3_prepare_v2 and sqlite3_step the following two statements:
@"delete from students;
@"insert into students select * from buffer.students;"
with 'buffer' being the database being attached as the source.
However, this…

Antoine Murion
- 773
- 1
- 14
- 26
0
votes
0 answers
SQLite freezes while performing sqlite3_step
Our app started logging crash reports caused by a deadlock in SQLite:
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: RUNNINGBOARD 0xdead10cc
It occurs in the iPhone/iPad version of…

Andriy
- 2,767
- 2
- 21
- 29
0
votes
1 answer
Sqlite using fts5 table to perform all queries instead of main table
So let's say I have two tables: users and users_fts where users_fts being the search table. So users has two fields name and surname.
Normally I would create index for both of em'. But since I have users_fts should I need to create index for name…

Axel
- 4,365
- 11
- 63
- 122
0
votes
1 answer
sqlite corrupt exception in xamarin.ios
I am having continuous crashes in ios, when trying to access sqlite database. My application has background sync process where it tries to fetch the data and store it in sql database in device.
Some how in IOS device randomly it crashes.
one of the…

Sai Sunkari
- 179
- 3
- 27
0
votes
0 answers
iOS sqlite: Looping through rows (sqlite3_step) with multiple tables to fetch the stored data
In my iOS app I'm able to create a database with two tables and insert data into their respective rows/columns. I'm having a problem while fetching the data at this while(sqlite3_step(statement) == SQLITE_OK) loop.
The instance method for fetching…

santobedi
- 866
- 3
- 17
- 39
0
votes
0 answers
Random EXC_BAD_ACCESS in SQLite operations
We are using SQLite database in our app. We are having plenty of select, update and insert SQLite operations. Our app is crashing randomly with below stack trace in CrashAnalytics.
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS…

varun
- 465
- 6
- 23
0
votes
1 answer
Access pre-existing database(read only) from iOS bundle
I have pre-created database stored in a folder inside my bundle. Can I access it directly from that folder without copying to Document folder?. I don't want to write anything to Db. Only want to read some data. I am using FMDB framework also.

Bazi Paleri
- 803
- 1
- 6
- 15
0
votes
1 answer
Retrieving values from SQLite table iOS
As I'm new to iOS programming,I have a doubt in retrieving data corresponding to a particular integer id from SQLite database table?
This is what I tried but seems wrong:
NSInteger id= sender.tag;
FMResultSet *rs = [self.databaseFM…

Jas
- 3,207
- 2
- 15
- 45