view the contents of the sqlite database

Hey

Have created a sqlite database and entries stored in the database, I'm stuck all trying to display the contents of the database on the screen.

I tried thi, but it does not work.

Try
{
D database;
Var myURI = URI.create ("file:///SDCard/Databases/SQLite_Guide/" +)
"MyTestDatabase.db");
d = DatabaseFactory.open (myURI, true);
Statement st = d.createStatement ("SELECT * FROM data ;"); ")
St.Prepare ();
St.Execute ();
St.Close ();
d.Close ();
}

Can someone tell me please on how should I proceed?

Thank you very much.

Remove the rank r = c.getRow (); exposed outside the while loop and check.

because, it is the 1st row in the result set is assigned to the r. If the query returns only one record, the while loop will not run.

Before you ensure that the data are available in the table.

Tags: BlackBerry Developers

Similar Questions

  • How to find the SQLite database browser on an imac

    Where is the SQLite database browser on an iMac?

    Here, you can get a http://sqlitebrowser.org/

  • Is it possible to display the SQLite database?

    I can debug my app on my Playbook, but is it possible to display the SQLite database? I want to confirm it works.

    If you can recover on your PC/Mac, I use "Lita" SQLite DB management applications (its an AIR application).

  • Rejection of the AppStore: location of the SQLite database

    I have an application that downloads data from the internet in a local SQLite database.

    Data are not generated for the user, and Apple has rejected my application because of it.

    The database may not be stored in/Documents /, but it should be stored in/Library/Caches /.

    How can I change this?

    http://www.saumitrabhave.com/2011/11/air-iOS-solving-apps-must-follow-iOS.html should help.

  • Unable to connect to the SQLite database in 9700

    Hi all, I have created a dt application dynamically retrieves data from a database stored locally Sqlite the strange thing is that this application works correctly on my 9800 and a friend 9930 but every time that the use of this app on 9700, it is impossible to connect to the database. Here is the code that I use to connect to the database (same code has been compiled and tested on all 3 devices):

    Connect to the database
    try {}
    Var myURI = URI.create("/store/home/user/documents/database.db");
    DB = DatabaseFactory.openOrCreate (myURI);
    } Catch (Exception e) {}
    If (db == null) {}
    Dialog.Alert ("unable to Access database');
    }

    Is there something on the 9700 device that I don't know? Because this code works on other devices... Help please.

    Finally, I discovered that it does not give the error if the database is stored on an SD card maybe 9700 does not support access sqlite on the memory of the device. Thanks for trying

  • Locations of the SQLite database

    Hi all

    IM developing an application that is run on OS 5.0 and more.  I know there is a limitation on what devices can store a database sqlite on the device itself.  I was wondering if anyone had a list of devices that support sqlite or where I could find it?  Also all os 5.0 do not come with the sd cards or bought them separately?

    Thanks in advance

    Hi zidane, please take a look at this thread

    http://supportforums.BlackBerry.com/T5/Java-development/persistent-storage-or-SQLite/TD-p/812739

    --

  • Using copyTo to copy the Sqlite database file to the directory of the user

    I am trying to copy my database Sqlite directory of private enforcement directory of documents accessible to the user. Here is my code:

    // closing db connection
    dbConnection.close();
    // clearing the db file variable
    dbFile = null;
    
    // new handle on the same db file
    dbFile = File.applicationStorageDirectory.resolvePath("mydb.db");
    // copy to documents directory
    dbFile.copyTo(File.documentsDirectory);
    

    When I try to run the code on the device, I get:

    There is an example on the Adobe AIR help page:

    original var = air. File.documentsDirectory.resolvePath ("AIR Test/test.txt");

    newFile var = air. File.documentsDirectory.resolvePath ("AIR Test/copy.txt");

    original.copyTo (newFile, true); true means crushes!

    Therefore, specify the new file name too not only the directory.

  • Protect the SQLite database

    Hi all

    In my application, I have a database that must be protected with a key to restrict other apps on this device to access.

    The problem is that I can't get the key signature at run time: whatever I do (...) CodeSigningKey.get always returns null.

    This is my code

            final CodeSigningKey key = CodeSigningKey.get(AbstractDB.class);
            if (key != null) {
                Log.d("+ GOT SIGNING KEY");
                final DatabaseSecurityOptions secopt = new DatabaseSecurityOptions(key);
                db = DatabaseFactory.create(name,  secopt);
            } else {
                Log.d("- SIGNING KEY IS NULL");
            }
    

    I downloaded Signing Authority Tool and created a TEST.key use it and put it in {project_root}/keys/TEST.key in my Eclipse project

    Also, I have TEST.key doule-click in Eclipse and class selected AbstractDB to be signed with it

    I run my application on a real device, not in the Simulator

    I run as follows

    1. start debugging on a device - this introduces packaging and siging the .cod file. (However, in the signature tool window, I get a warning on my TEST.key: "Unregistered" and "please contact the signer and register with signing authority.")

    2. with the signing authority tool, I sign my .cod file obtained in step 1 using my TEST.key

    3. I click on debug on the device once more, sign tool signs the main .cod file again, and then the application will start on the device.

    However, the key I get from CodeSigningKey.get (.) is always zero.

    Do I did wrong

    First of all, you need an instance of object in CodeSigningKey.get (...), like get (this). However, there is one thing, you should: If your object extends certain classes and/or implements interfaces, then ALL those who must be signed with the same key, in order to work. If no ancestor classes/interfaces is not signed, you get null.

    This can be a problem if your hierarchy is deep enough. Information on classes are signed with keys that are stored in BlackBerry_App_Descriptor.xml and copied in the signature tool settings when you click on debug. It may happen that command line gets too long so the signing tool fails with the message "Invalid parameter" in the console.

    So I extracted a class specially for the purposes of the signature:

    final public class SignatureClass {    private static final SignatureClass INSTANCE = new SignatureClass();
    
        private SignatureClass(){}
    
        public static CodeSigningKey getKey(){        return CodeSigningKey.get(INSTANCE);    }}
    

    I only sign this class with my key and use SignatureClass.getKey () to get the key.

    PS: Also, if you move/rename the classes or the keys to verify this signature references in the BlackBerry_App_Descriptor.xml are valid. They are not being updated automatically.

  • Select the query in the sqlite database

    Hello friends,

    I used this application in my application... It worked fine...

    Select fld_name in the limit of 0.10 tbl_placelist

    But when I used the query below, he showed me error...

    «Select fld_name in the limit of tbl_placelist «+ s1, 10»»

    I do not have how to pass two values (i.e) a global variable and an integer in the limit

    Can someone help me...

    Maybe I'm missing something but you want to say something like this:

    S1 int = 0;

    int s2 = 10;

    String q = 'select fld_name from tbl_placelist limit' + s1 + ', ' + 's2;


  • When sqlite database will be located in the Simulator.

    Hi all

    I wanted to get the location of the sqlite database file, but don't really know where it is located.

    Here is my code to create a database.

     QSqlDatabase database = QSqlDatabase::addDatabase("QSQLITE");
     database.setDatabaseName("./data/customerDatabase.db");
    

    Any help would be appreciatied.

    Oh, I think that I understand your question now.

    The db file will be updated

    //data/customerDatabase.db

    The com.example.quotes.testDev_mple_quotes19e3de88 file will be little difference in your Simulator. You must use the System target file browser (Windows--> views show others-->--> QNX target--> target file system browser) to navigate to this folder.   You should find the folder with the name of the started by your package declared in your bar - descriptor.xml name.

  • How to display a SQLITE database being created

    In my application Iam using the SQLITE database. I discovered the code how to create DB and create a disk etc. My question is:

    Is it possible to display dashboards created DB and its fields and records which is recorded in this table. I can't find any answer for this that I've seen to recover the data in the table by using queries and display in a listView, etc..

    Is it possible to display the SQlite DB tables and their fields and the saved recordings in their. Please help me out

    In Momentics choose View Navigator of the target file system. You can use 'copy to file system' to copy the database on your PC.
    On the PC, I use the Firefox "SQLite Manager" plugin to display and manipulate data. You can find it using the plugin manager.

  • Error "a plugin is required to view this content" for the integrated Google map, but plugin not identified.

    When I try to view a page that has a map Google map into the page, I get the message error 'a plugin is required to view this content. However, I don't know which plugin, where to find, etc. I tried searching for this question but could not reach anyone else has a similar problem, or there seems to be a plugin for Google Maps that I can find.

    The page is here:
    http://osiama.org/lodges#

    The map is displayed when turned on one of the links in the table.

    I was going to propose to add the type = "text/html" in the embed tag, but found a discussion saying that does not work: http://stackoverflow.com/questions/17688628/firefox-tells-user-they-need-a-plugin-to-display-an-embedded-webpage

    After the graduation in this thread, what to place your stir inside a tag object like this:

    <object type="text/html" data="https://www.google.com/maps/embed/v1/place?key=AIzaSyA4e2zvSt_VeKb6u_IMvBSAuIPPINgfzNU&q=Nazzaro+Community+Center&zoom=15" height="300" width="450" frameborder="0" style="border:0;">
      <embed src="https://www.google.com/maps/embed/v1/place?key=AIzaSyA4e2zvSt_VeKb6u_IMvBSAuIPPINgfzNU&q=Nazzaro+Community+Center&zoom=15" height="300" width="450" frameborder="0" style="border:0;">
    </object>
    

    So in other words, the browsers that can use the object tag will do it, but for those who do not, the embed is still there. Does it work?

  • I'm not able to view the video content in Firefox from any Web site.

    When you try to view the video content on youtube, I get the following message. "An error has occurred. "Please try again later". Another Web site simply do not load the video clip.

    Hello eddie, it is most likely a problem in the context of the recent update of the adobe flash plugin, please see the following article for common solutions: 11.3 Flash does not load video in Firefox

  • I have a problem. Update of Flash Player required you must download and install the latest version of Adobe Flash Player to view this content. but my Flash player is up-to-date. I use ubuntu10.4, firefox 8.0

    I have a problem. Update of Flash Player required you must download and install the latest version of Adobe Flash Player to view this content. but my Flash player is up-to-date. I use ubuntu10.4, firefox 8.0

    You are welcome

  • After I restart my iMac and double-click on the hard drive, a pop up appears with this message: 'the 'Hard drive' file cannot be opened because you don't have permission to view its contents.'.  What is the problem?

    After I restart my iMac and double-click on the hard drive, a pop up appears with this message: 'the 'Hard drive' file cannot be opened because you don't have permission to view its contents.'.  What is the problem?

    Is the name of an external drive or internal one?

Maybe you are looking for