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 8650159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:45:02+00:00 2026-06-12T13:45:02+00:00

I have created sqlite database. I add this sqlite file in my application but

  • 0

I have created sqlite database.

I add this sqlite file in my application but when I run the app in the simulator and check the sqlite file’s path in document directory and I open the sqlite file on document directory’s path at that time the table which I have created does not appear.

In local copy I can see the table also in my project folder I can see the table but on the path of simulator I am not able to see the table

so in my console it shows me the error:

Sqlite Prepare failed: no such table

  • 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-12T13:45:04+00:00Added an answer on June 12, 2026 at 1:45 pm

    My response below assumes that your database is properly formatted and functional. You could test easily via the command line. In my own apps, all tab bar controllers apps, I place the db access code in the app delegate. The two methods in the app delegate are as follows:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions (NSDictionary *)launchOptions {
        [self createEditableCopyOfDatabaseIfNeeded];
        [self.window setRootViewController:rootController]; 
        [window makeKeyAndVisible];
        return YES;
    }
    

    Also:

    - (void)createEditableCopyOfDatabaseIfNeeded {
    
        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
        NSString *documentsDir = [paths objectAtIndex:0];
    
        NSFileManager *fileManager = [NSFileManager defaultManager];
        NSError *error;
        NSString *dbPath =[documentsDir stringByAppendingPathComponent:@"dbName.sqlite"];
        BOOL success = [fileManager fileExistsAtPath:dbPath];
        if(!success)
        {
            NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"dbName.sqlite"];
            success = [fileManager copyItemAtPath:defaultDBPath toPath:dbPath error:&error];
    
            if (!success)
                NSAssert1(0, @"Failed to create writable database file with message '%@'.", [error localizedDescription]);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a working SQlite database in my application. I can add new
I have made this code to open a database(created in SQLite browser) stored in
I have Created a database in Sqllite Android Application and I tried to add
I am new to using the SQLite database in iphone apps. I have created
I have an SQLite database. I created the tables and filled them with a
I have an app that creates a SQLite database ( with 24 records ),
In this example we have 3 related tables on a SQLite database: CREATE TABLE
I am fairly new to this deployment of sqlite database with C# winforms application.
I am developing an android database application in which i have to add multiple
I have created a simple products table with sqlite database using ruby. I can

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.