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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:10:15+00:00 2026-06-05T07:10:15+00:00

I have implemented a Phonegap application for iPhone using jQuery mobile . I have

  • 0

I have implemented a Phonegap application for iPhone using jQuery mobile. I have created a database using sqlite.

I have created my own data base 0000000001.db with some list of tables.

added it in to resources folder of xcode proj,

and preloaded this data base in to the application in to the WebKit folder.

when i cheack using sqlite manage it show all my data base tables and the content in the tables. But i want to show that content in the list views (table views)

I preloded the data base by following the Gaurav S Tomar™ Tutorial Link.

I dont know what are the next steps for data driven from the sqlite data base

Now I want to retrieve the data from the database tables and populate it in to list views (table views).

i was very new to the phone gap applications,

I dont know were (in wich files) we implement the code to retrieve data from data base from my sqlite file 000001.db

and how to display /populate that retrieved data base in list views

Any detailed suggestions / tutorials please? Thanks in advance..


I have added a .js file main.js in that i have implementedm

function queryDB(sql) {
    dbmanager.connect_database();
    dbmanager.db.transaction(function(tx){
                             tx.executeSql(sql,[],getResult,dbmanager.errorCB);
                             },dbmanager.errorCB);
}

function getResult(tx,results)
{ 

     for(var i=0;i<results.rows.length;i++){
    console.log(results.rows);
     console.log(results.rows.item[i]);
     }

}

$(document).ready(function()
                  {

                  $('#OneView').click(function() 
                                       {
                                       queryDB('select * from table');
                                       });



                  });

in that console.log(results.rows); prints like : {"length":3}

console.log(results.rows.item[i]); prints TypeError: Result of expression 'message' [undefined] is not an object.

But not the column values i have added in the table

  • 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-05T07:10:16+00:00Added an answer on June 5, 2026 at 7:10 am
    function queryDB(tx) {
        tx.executeSql('SELECT * FROM DEMO', [], querySuccess, errorCB);
    }
    
    // Query the success callback
    //
    function querySuccess(tx, results) {
      //console.log("Returned rows = " + results.rows.length);
    // this will be true since it was a select statement and so rowsAffected was 0
    if (!resultSet.rowsAffected) {
    console.log('No rows affected!');
    return false;
    else
    {
      //your list view code should be here.
    }
    }
    

    use http://docs.phonegap.com/en/1.7.0/cordova_storage_storage.md.html#SQLResultSet

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

Sidebar

Related Questions

I have implement an iPhone application in jQuery mobile and Phone Gap Using list
I have implemented an application using jQuery mobile and phone gap (cordova based application)
I have a simple app developed with jQuery Mobile and implemented in PhoneGap. It
I am developing an iphone app on phonegap and I am using jQuery mobile.
I have implemented a sencha touch phone gap application on ipad. using the kitchen
I'm developing a native mobile app for Android and iOS using PhoneGap.I have a
I have implemented an app in iphone using sencha touch & phone gap .
I have a web application for iPhone, which will ultimately run within a PhoneGap
I have the following code which worked fine before I implemented jquery mobile. Now,
To implement as above in an PhoneGap iPhone application I have used nested list

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.