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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:07:44+00:00 2026-06-14T06:07:44+00:00

I have a Phonegap (2.1.0) application that onDeviceready creates a DB and populates a

  • 0

I have a Phonegap (2.1.0) application that onDeviceready creates a DB and populates a table with info.

Running this locally (using the Ripple emulator) on Chrome works. Tables are being created and populated as required.

After installing the build .apk on my Android device my Eclipse logcat shows:

    sqlite returned: error code = 14, msg = cannot open file at line 27712 of [8609a15dfa], db=/data/data/<project>/databases/webview.db

    sqlite returned: error code = 14, msg = os_unix.c: open() at line 27712 - "" errno=2 path=/CachedGeoposition.db, db=/data/data/<project>/databases/webview.db

Which I believe according to this post here – can be ignored.

However – I also noticed this error in logcat:

    sqlite returned: error code = 1, msg = no such table: latest_events, db=/data/data/<project>/databases/webview.db

I have also – through adb shell – confirmed that the DB is not created:
here: /data/data/com.application/databases.
or here: /data/data/com.application/app_databases

So – my code:

 if (!window.openDatabase) {
        doMessage('Databases are not supported on this device. Sorry','error');
        return;
    }else{
        consoleLog('all good for storage');
        var db;
        var shortName = 'MyDB';
        var version = '1.0';
        var displayName = 'MyDB';
        var maxSize = 102400;

        function errorHandler(transaction, error) {consoleLog('Error: ' + error.message + ' code: ' + error.code);}

        function nullHandler(){};
        db = window.openDatabase(shortName, version, displayName,maxSize);


            consoleLog('starting table creation');
            db.transaction(function(tx){
                tx.executeSql( 'CREATE TABLE IF NOT EXISTS latest_events (id integer PRIMARY KEY AUTOINCREMENT,EventID integer,EventLocation text,EventName text,EventDateFrom varchar,EventTime timestamp,EventPresentedBy varchar,EventVenue varchar,EventScript text,RequireRSVP varchar)',[],nullHandler,errorHandler);
                db.transaction(function(tx){
                    tx.executeSql('SELECT count(id) as RowCount FROM device_info ', [],
                        function(tx, result) {
                            if (result != null && result.rows != null) {
                                for (var i = 0; i < result.rows.length; i++) {
                                    var row = result.rows.item(i);
                                    consoleLog('rowcount: '+row.RowCount);
                                    if(row.RowCount==0){
                                        tx.executeSql('INSERT INTO device_info (device_name, device_platform, device_uuid, device_os_ver, date_last_used) VALUES (?,?,?,?,?)',[device.name, device.platform, device.uuid, device.version, window.bowman_config.siteDate],nullHandler,errorHandler);
                                        //doMessage('device info row added','notice');
                                    }
                                }
                            }
                        },errorHandler);
                },errorHandler,successCallBack('2'));
                //doMessage('device info row added','notice');
            },errorHandler,successCallBack('1'));
}

To add to my woes – on my logcat I do see the console.log output for “all good for storage”, and the “starting table creation” messages.

My errorHandler functions are not returning anything and my successCallBack functions are triggered…but no DB created.

Thanks for the help.

  • 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-14T06:07:45+00:00Added an answer on June 14, 2026 at 6:07 am

    When you pass in successCallBack(“2”) and successCallBack(“1”) then you are actually invoking them directly so you may be getting false positives on whether or not success has actually been called. You should provide two separate success call backs or just in-line some functions that call console.log(“1”) for instance.

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

Sidebar

Related Questions

I have an application that is using jquery, jquerymobile and spine.js running on phonegap
I have implemented an application using jQuery on PhoneGap. In that I'm using a
I have a phonegap application targeting iPad that needs to embed a video on
I have developed the android phonegap application using html page and css. But My
I'm thinking of developing a Windows Phone 7 application using PhoneGap and have a
i am using jquery for first time in a phonegap eclipse application.i have downloaded
I have developed a android application using phonegap. I have registered certain recievers which
I have an application made by using phonegap 1.5.0 and jquery mobile 1.1.0.... I
I have a PhoneGap mobile application that I need to generate an array of
I have this situation - PhoneGap app running in Android. It uses external API

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.