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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:31:28+00:00 2026-06-01T12:31:28+00:00

I am using rawQuery method to get the list of data as Cursor and

  • 0

I am using rawQuery method to get the list of data as Cursor and using startManagingCursor() and stopManagingCursor() method. There is no problem for Activity1 and Activity2 but when I try to go to Activity2 from Activity3 it says 04-09 17:37:59.629: E/AndroidRuntime(6509): java.lang.RuntimeException: Unable to resume activity {com.nepways.nlocate/com.nepways.nlocate.BusinessOrganizationActivity}: java.lang.IllegalStateException: database /data/data/com.nepways.nlocate/databases/nLocateDatabaseNew.db already closed

Anyone have some help?

UPDATE CODE

    public class BusinessActivity extends Activity implements OnItemClickListener {

    private ArrayList<Business> businessList = new ArrayList<Business>();
    private BusinessListAdapter businessListAdapter;
    private ListView lvBusiness;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.business_list);

        businessList = getIntent().getParcelableArrayListExtra("businessList");

        businessListAdapter = new BusinessListAdapter(this, businessList);

        lvBusiness = (ListView) findViewById(R.id.lvBusiness);
        lvBusiness.setAdapter(businessListAdapter);
//      lvBusiness.setOnItemClickListener(this);
    }

    @Override
    public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
        // TODO Auto-generated method stub

    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        menu.add("Search").setIcon(R.drawable.ab_search).setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
//      return super.onCreateOptionsMenu(menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        if(item.getTitle().toString().equalsIgnoreCase("Search")) {
            startActivity(new Intent(this, SearchActivity.class));
        }
        return super.onOptionsItemSelected(item);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void onPause() {
        super.onPause();
    }

}
  • 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-01T12:31:29+00:00Added an answer on June 1, 2026 at 12:31 pm

    please open your database, it is clearly mention that your database is close.

    to open database call getReadableDatabase()

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

Sidebar

Related Questions

I'm using the following method to get data from a table: Cursor c =
I am having some trouble in using a rawQuery to get a cursor for
I'd like to use SQLiteCursor class to fetch data (not using Cursor class). This
I am using rawquery() for perform inner join, but this is not giving me
I need to store a record using rawQuery() method, because I want to insert
Using ruby(1.8.7) , rails(2.3.8) , rspec(1.3.1) and rspec-rails(1.3.3) how do I test a method
Using delphi 2010, i am wondering if there someway to escape the following string
I've got a query, (I'm using rawQuery() ) SELECT * FROM <table> I'm then
I am using this code- myDB.rawQuery(SELECT * FROM + TableName+ ORDER BY + params[0],
I'm using a raw query and i'm having trouble finding out how to get

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.