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

The Archive Base Latest Questions

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

Running into a major brick wall here. I have a database of data that

  • 0

Running into a major brick wall here. I have a database of data that I need to package in a sql lite database. I also need to be able to query this database from a webview in javascript. When trying to query the database in javascript, sql lite is returning an error code 1 with a message of “no such table”. Any ideas?

Here’s the js code

    var database = window.openDatabase("testdb5", "", "main total", 1024 * 1024);

        if (database)
            document.write('got');

        database.transaction(function (tx) {
            tx.executeSql("SELECT * FROM testtable", [], function (tx, result) {
                for (var i = 0, item = null; i < result.rows.length; i++) {
                    item = result.rows.item(i);
                    document.write(item.name);
                }
            });
        });

Here’s the relevant java :

    WebSettings settings = myWebView.getSettings();
    settings.setJavaScriptEnabled(true);
    settings.setDatabaseEnabled(true);

    //String databasePath = this.getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath();
    String databasePath ="/data/data/com.example.helloandroid/databases/";
    settings.setDatabasePath(databasePath);

    myWebView.setWebChromeClient(new WebChromeClient() {
            @Override
            public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize,
                    long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater) {
                    quotaUpdater.updateQuota(estimatedSize * 2);
            }
    });

Sucks that there’s no documentation on this! Any help is much appreciated.

  • 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:15:04+00:00Added an answer on May 25, 2026 at 4:15 pm

    This is hopeless. For posterity’s sake, I decided to simply create a javascript interface and call methods that would natively interact with the sql lite database.

    The only problem with this solution is that my code won’t be as portable. I will have to figure out some hacky solution to put it on IOS… Such is life.

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

Sidebar

Related Questions

I am running a database that acts as the source for data to import
I have a few huge tables on a production SQL 2005 DB that need
We are running Postgres 9.1.3 and we have recently started to run into major
Running into an issue with a streamwriter I have a web page that has
So i am running into a major issue. I am currently trying to use
Running into a problem. I have a table defined to hold the values of
I'm running into a Spring (3.1) mapping conundrum: I have a simple, findAll method:
I was running into the following issue: // $data contains some image data $gm
Microsoft's Concurrency and Coordination Runtime quite literally saved a project that was running into
I'm running into an issue with a custom approval workflow that was written in

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.