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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:30:49+00:00 2026-06-09T18:30:49+00:00

I have an application which runs fine under BlackBerry OS 7.0, but when I

  • 0

I have an application which runs fine under BlackBerry OS 7.0, but when I run the same application under BlackBerry OS 6.0, the SqLite cursor reaches the end of the data immediately, so I can’t fetch any data from the database.

 public static Vector GetProducts(String sysID) {
  Bitmap img = null;
  try {
   Statement st = d
     .createStatement("SELECT * FROM Product where systemSerID=?");
   st.prepare();
   st.bind(1, sysID);
   st.execute();
   Cursor c = st.getCursor();

   Products products;
   Vector pro = new Vector();

   while (c.next()) {

    Row r = c.getRow();
    products = new Products();
    products.setSystemServiceID(r.getString(1));
    products.setSystemServiceName(r.getString(2));
    products.setProductID(r.getString(3));
    products.setProductName(r.getString(4));
    products.setProductDesc(r.getString(5));

    products.setProductType(r.getString(devil));
    // products[i].setProductType("1");
    products.setBatchID(r.getString(7));
    products.setMinValue(r.getString(music));
    products.setMaxValue(r.getString(9));
    products.setImageURL(r.getString(10));

    System.out.println(" retrived from database.");
    pro.addElement(products);
   }

   c.close();
   st.close();
   return pro;

  } catch (DatabaseException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
   return null;

  } catch (DataTypeException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
   return null;
  }

 }
  • 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-09T18:30:51+00:00Added an answer on June 9, 2026 at 6:30 pm

    The documentation for Database says:

    If the Statement might return results, run the Statement by calling Statement.getCursor().
    Statement.execute() – Use when you want to explicitly prepare and close the Statement.

    Since you want to access a result set, you shouldn’t call Statement.execute(). getCursor() causes the query to execute, so you should be able to delete the execute() call to get the behavior you want.

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

Sidebar

Related Questions

I have a WPF application which runs fine on Windows 7 OS. But the
I have a server application which runs fine in most of the cases but
I have a multithreading server application which runs fine for the first ca. 40
I have a Grails 2.1.1 application which runs fine, at least until I try
I have an application which is running fine on WAS 6.0 but throwing a
I have an application that runs fine on .Net 2.0 SP2, but fails to
Our application which runs fine on previous versions of TS have a new issue
I have an ASP.Net MVC application which runs fine on my local development machine.
I have a ASP.Net Application which runs fine on my development machine, however, when
I have an ASP.NET application which runs fine on my local development machine. When

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.