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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:42:28+00:00 2026-05-29T04:42:28+00:00

I created a pre-populate SQL Lite DB an added it to my app as

  • 0

I created a pre-populate SQL Lite DB an added it to my app as described in my other question.

Now, how can I use this DB?

I guess I need to use openDatabase but how do i make it open my DB in /assets/data.db?

I tried this:

        var shortName = 'data'; 
        var version = '1.0'; 
        var displayName = 'data'; 
        var maxSize = 65535;

        var db = openDatabase(shortName, version, displayName, maxSize); 

        function errorHandler(transaction, error)
        {
            // error.message is a human-readable string.
            // error.code is a numeric error code
            alert('DB Error: '+error.message+' (Code '+error.code+')');
        }

        db.transaction(
            function(tx) {
                tx.executeSql('SELECT street, numbers FROM streets', [], function(tx, results) {
                    // do some more stuff
                    alert("My first database query finished executing!");
                }, errorHandler);
            }
        );

But get sqlite returned: error code = 1, msg = no such table: streets.

I used the SQLite Database Browser to make sure the table exists. BTW: I don’t have a 0000000000000001.db file.

  • 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-29T04:42:30+00:00Added an answer on May 29, 2026 at 4:42 am

    Did you add the Java code from http://gauravstomar.blogspot.com/2011/08/prepopulate-sqlite-in-phonegap.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+GauravSTomarBootstrappingIntelligence+%28Gaurav+S+Tomar+%3A+Bootstrapping+Intelligence%29 to copy your DB from the assets folder to the correct folder on your device?

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

Sidebar

Related Questions

So I have this SQL table that I need to update. Now we use
If you want to pre-populate a database (SQLite) in Android, this is not that
I can pre-populate my Stripes JSP form with an object, client in my case,
In the jsf page I created, 3 other jsp pages are added through page
How does one convert a stand-alone .tlb file created in a pre-2009 version of
I want to pre-append some text a a CSV file that is created by
I have a .NET assembly DLL that is created on-the-fly from pre-compiled code in
How can I create a new Exception different from the pre-made types? public class
Okay, here's my situation. I have a WPF app that I have created that
So, I am going to be running this script every 4 hours to populate

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.