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

The Archive Base Latest Questions

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

I have incorporated a database into my Blackberry application. When I start the application

  • 0

I have incorporated a database into my Blackberry application. When I start the application the database builds, and it inserts values into the database. However when I change the class i.e using this

        HelloBlackBerryScreen bbScreen = new HelloBlackBerryScreen();
        UiApplication.getUiApplication().pushScreen(bbScreen);
        this.invalidate();

when I reload the previous class I get this:

 [0.0] FileIO:fileinfo start 5e2
 [0.0] FileIO:info by name complete 5e2
 [0.0] FileIO:fileinfo start 5e3
 [0.0] FileIO:info by name complete 5e3
 [0.0] FileIO:open start 5e4
 [0.0] FileIO:open complete 5e4
 [0.0] FileSystem:bad open status 12
 [0.0] File system error (12)read error here
 [0.0] No stack trace

When the application initally starts, it reads the database fine, and certain values are loaded in the the relevant areas, then I switch to another class, which also can access the database, and then switch back to the first class and I get that error. Am I not closing the database properly when I go into the next class?

Here is the code I use to get the database values:

public void getValues(){
        try {
            URI uri = URI.create("file:///SDCard/Databases/" + "database2.db");
            sqliteDB = DatabaseFactory.open(uri);
            Statement st = sqliteDB.createStatement("SELECT Signauto,SaveP FROM options");
            st.prepare();
            Cursor c = st.getCursor();
            Row r;
            int i = 0;
            while(c.next()) 
            {
                r = c.getRow();
                i++;
                System.out.println(r.getString(0) + "HERE");
                System.out.println(r.getString(1) + "HERE");
                if(r.getString(0).equals("true")){
                    tickBoxes[1] = true;
                    //signAuto();

                }
                else{
                    tickBoxes[1] = false;
                }
                if(r.getString(1).equals("true")){
                    tickBoxes[0] = true;
                    setUserPass();
                }
                else{
                    tickBoxes[0] = false;
                }

            }

            if (i==0)
            {
                System.out.println("No data in the options table.");
            }
            st.close();
            sqliteDB.close();
        }

        catch ( Exception e ) {
            System.out.println( e.getMessage() + "read error here");
            e.printStackTrace();
        }
    }
  • 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-25T16:48:38+00:00Added an answer on May 25, 2026 at 4:48 pm

    A few things to try.

    Move the close statements into their own catch blocks so that an exception in one doesn’t prevent the other from closing.

        } finally {
            try {
                if (st!=null) st.close();
            } catch (DatabaseException e) {
                System.out.println( e.getMessage() + "read error here");
            }
            try {
                if (sqliteDB!=null) sqliteDB.close();
            } catch (DatabaseIOException e) {
                System.out.println( e.getMessage() + "read error here");
            }
        }
    

    Also synchronize your methods accessing the DB so that one doesn’t cause an exception in another.

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

Sidebar

Related Questions

I am using the Business Silverlight application. I have incorporated some MVVM into this
I am a web application developer using Coldfusion 9. I have incorporated the use
I have made a custom formwizard and incorporated it into my admin interface. Basically
Have you used VS.NET Architect Edition's Application and System diagrams to start designing a
I'll start off by saying I'm a noob with all of this, I have
I have a database that I would like class files generated from, and also
I have a ASP.Net page using ADO to query MS access database and as
I have a .csv file that I turned into an SQLite database with the
how to add checkbox values in mysql database?Please help I always get this error
I have incorporated ActiveRecord into a script I am writing to process some data

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.