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

  • Home
  • SEARCH
  • 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 7515021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:40:10+00:00 2026-05-30T00:40:10+00:00

I have developed a application and i used sq-lite database wrapper (BWDB – wrapper

  • 0

I have developed a application and i used sq-lite database wrapper (BWDB – wrapper by Bill W…..) for my tab based application and when i create the database object at my first view controller using this code

- (DBAccess *) loadDBAccessDatabase {
    // NSLog(@"%s", __FUNCTION__);
    if (!_dbObject) {

        NSString * _dbFileName = @"turfnutritiontool_ver_one.db";
        _dbObject = [[DBAccess alloc] initWithSSDBAccessFilename:_dbFileName];
    }
    // Check Point
    [TestFlight passCheckpoint:@"LOAD_DATABASE"];
    return _dbObject;
}

and it works for me in this view controller but if i create a new object when second view Controller load so the new db object work fine for data fetch but i am not able to insert or update database it says db is lock so tell me how i can manage only one db object across all the app and send to other view controller so that it works fine,

  • 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-30T00:40:12+00:00Added an answer on May 30, 2026 at 12:40 am

    So you are creating two objects of the class containing this code? If so, the easiest way might be to make the _dbObject member static, as in

    static DBAccess *_dbObject;
    

    Going further, you could consider creating a singleton for the database base reference. An introduction to singletons for Cocoa is provided by Apple in Mac OS X Developer Library.

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

Sidebar

Related Questions

VS 2005 SP3 I have developed application and used the setup project to create
I have developed an iPhone application based on Tab bar & Navigation bar and
I have used spring framework 3 for my application. Everything is ok while developed
I have developed an application which is working fine. In that i have used
I have desktop application developed in C#. The VM Size used by application is
I have a web application developed in asp.net 3.5. The application is used in
I have developed a web application that uses a web server and database hosted
I have developed a RIA application where i have used many and many dialogs
I have developed a .net application using .net framework 4.0 where I have used
I have developed an application using php, mysql and xajax. I always used to

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.