Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7840107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:39:41+00:00 2026-06-02T15:39:41+00:00

Hi i am using database in iphone. After along time, My application gave this

  • 0

Hi i am using database in iphone. After along time, My application gave this error

sqlite error 14 [unable to open database file] 

My application is going good but some times it generates the above error.What is the solution?
There is the code:

[lovkid openDatabase:[appDelegate getDBPath]];
NSString *Flag = [NSString stringWithFormat:@"%@", appDelegate.selectimage];
    int recId = (int)appDelegate.Id;
    NSLog(@"recID = %d",appDelegate.Id);

    updateStmt1 = nil;
    if(updateStmt1 == nil) 
    {

        const char *sql ="UPDATE 'char' SET `Pic`=? WHERE `id`=?";
        if(sqlite3_prepare_v2(database1, sql, -1, &updateStmt1, NULL) != SQLITE_OK)
            NSAssert1(0, @"Error while creating add statement. '%s'", sqlite3_errmsg(database1));
    }
    sqlite3_bind_text(updateStmt1, 1, [Flag UTF8String], -1, SQLITE_STATIC);
    sqlite3_bind_int(updateStmt1, 2, recId);

    if(SQLITE_DONE != sqlite3_step(updateStmt1))
        NSAssert1(0, @"Error while inserting data. '%s'", sqlite3_errmsg(database1));
    else
        NSLog(@"no error");



    sqlite3_reset(updateStmt1);
    sqlite3_finalize(updateStmt1);

…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T15:39:42+00:00Added an answer on June 2, 2026 at 3:39 pm

    well u need to try out my answer from the post

    and make sure u write the two functions (of the post ) in ur application delgate that way ur app will open DB once

    Let me Know if it worked

    Cheers 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been reading through this tutorial for using a SQLite database within an iPhone
In my application i m using sqlite database.when i run it in iphone simulater
I am new to using the SQLite database in iphone apps. I have created
My iPhone application uses Core Data and a SQLite database; versions are being tracked
I'm using sqlite in an IPhone app for a readonly database. One use case
How to use sqlite database in iphone using xcode 4.3.2.... I am having problem
I am new to iPhone programming,need some Help, I am using SQLITE Database In
I am using sqlite database in my iphone app. I am writing code for
I want to implement SQLite database for iPhone using PhoneGap. I know some basics
I am using SQLITE database in my iPhone app. I have a refresh button

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.