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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:15:48+00:00 2026-05-25T03:15:48+00:00

I tried importing db in my Supporting files folder and connected to db using:

  • 0

I tried importing db in my Supporting files folder and connected to db using:

NSString *sqliteDb = [[NSBundle mainBundle] pathForResource:@”person” ofType:@”sqlite”];
if(sqlite3_open([sqliteDb UTF8String], & database)!=SQLITE_OK)

I tried inserting values through code which got inserted but when I quit the program and check the db that values are not present. I don’t know what’s going wrong here.

  • 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-05-25T03:15:48+00:00Added an answer on May 25, 2026 at 3:15 am

    Ok. Now copy that database to any local place which will be your data storage of the application. The code given below will do the same.

        NSArray *docPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);
        NSString *docDir = [docPaths objectAtIndex:0];
        NSString *dbPath = [[docDir stringByAppendingPathComponent:@"person.rsd"] retain];    
        NSFileManager *fm = [NSFileManager defaultManager];
        BOOL success = [fm fileExistsAtPath:dbPath];
        if(success) return;
        NSString *dbPathFromApp=[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent :@"person.rsd"];
        [fm copyItemAtPath:dbPathFromApp toPath:dbPath error:nil];
    

    After that, execute your query and you will get inserted data in your application simulator folder.

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

Sidebar

Related Questions

I tried importing product images into Magento using an absolute path, but it did
What's the deal with Visual Studio? I tried importing the Caching App Block and
In SSIS,I had tried to deploy a package, which is for importing data from
I tried importing the SVG XML Schema into EMF, to obtain the SVG metamodel
Today I tried using pyPdf 1.12 in a script I was writing that targets
I have problems importing a boost-python module on WinXP-32. I'm using python 2.6.6, boost.python
I have tried importing a .zip project through eclipse by right clicking the project
I'm working with FMOD in C#. I've tried importing the fmodex.dll file by selecting
I tried importing a database dump from a SQL file and the insert failed
I am importing some c++ dll into a c# project, I am using visual

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.