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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T12:02:11+00:00 2026-06-02T12:02:11+00:00

I create a database in a phonegap application (android) and populate it with test

  • 0

I create a database in a phonegap application (android) and populate it with test values.

var db = window.openDatabase("achievements", "1.0", "AchievementsDB", 1000);
    db.transaction(createTables, function(tx, error){
        console.log("Error Creating Tables: "+error);
    }, function(){
        console.log("Successfully created Tables in Database");
    });

here is the createTables function

function createTables(tx){
tx.executeSql('CREATE TABLE IF NOT EXISTS Achievements (name unique, description)');  
tx.executeSql('INSERT INTO Achievements (name, description) VALUES (0, 1)');
tx.executeSql('INSERT INTO Achievements (name, description) VALUES ("good", "morning")'); 

}

the problem is. I always get the error Callback back. When I try a SELECT on the database it always says the retrieved data (the result data) is undefined. Also, I was wondering why I can´t access the data/data/mypackage/database folder of the phone (actually, DDMS just shows an empty data folder).

I really dont know anymore what´s the problem here I really googled and stackoverflowed a lot about this. Please give any 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-02T12:02:16+00:00Added an answer on June 2, 2026 at 12:02 pm

    First of all Phonegap makes the database here

    /data/data/package-name/app_database/file__0/0000000000000001.db

    Secondly Where do you actually get the ErrorCallback in which query?

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

Sidebar

Related Questions

I want to create an SQL database for a phonegap application that i am
In PhoneGap how do I create/open a database in Android? I am using this
I want to create a PhoneGap-Application with multiple database tables that will be parsed
In android phonegap application, I created 5 or more question with respective option (checkboxes)
I'm having problems doing the Database example from PhoneGap. http://docs.phonegap.com/phonegap_storage_storage.md.html#openDatabase The Problem is, when
I want ot create database table in which I can store application settings. Which
Suppose I did this: CREATE DATABASE TEST; GRANT ALL ON TEST.* TO user@% IDENTIFIED
I create database "Test" in folder "d:\test". Database files are "d:\test\Test.mdf" and "d:\Test\Test_log.ldf". I
I want to create database at the first time of an application deploying process.
Is it reasonable for an application to create database tables dynamically as a means

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.