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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:07:16+00:00 2026-06-04T19:07:16+00:00

My problem is the following: I’m creating a sqlite Database using Javascript in my

  • 0

My problem is the following: I’m creating a sqlite Database using Javascript in my Phonegap-App and am getting the following information from eclipse (LogCat): sqlite returned: error code 14, msg= cannot open file at source 25467

This is how i initialize the db (works fine):

function initDB() {
  try { 

    if (!window.openDatabase) { 

      alert('doesn't work!'); 

    } else { 

      var shortName = 'name'; 

      var version = '1.0'; 

      var displayName = 'displayname'; 

      var maxSize = 65536; // in bytes 

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

      db.transaction(populateDB, errorCB, successCB);
     }

  } catch(e) { 

    // Error handling code goes here. 

    if (e == INVALID_STATE_ERR) { 

      // Version number mismatch. 

      alert("Invalid database version."); 

    } else { 

      alert("Unknown error "+e+"."); 

    } 

    return; 

  } 

}

so the variable db is initialized with my database. Then i try to populate the db, with this code:

function populateDB(tx) {
  //dropping the table if exists for testing
  tx.executeSql('DROP TABLE IF EXISTS CLIENT');

  //creating a table
  tx.executeSql('CREATE TABLE IF NOT EXISTS CLIENT (id int NOT NULL PRIMARY KEY, name text, adress text, notes text)');  

  //inserting an entry for testing -- SQLITE ERROR 14 HERE!
  tx.executeSql('INSERT INTO CLIENT (name, adress, notes) VALUES ("client1","adress1","note1")');
}

the line where i try to INSERT INTO CLIENT doesn’t work, so the transaction calls the callback function errorCB, which says “Error processing SQL: 1” and LogCat says sqlite returned error 14.. Can’t seem to fix it, i’m giving my app all permissions.. and creating the table CLIENT doesn’t give me any errors, so i think the app has permissions to write into the db file? what is the problem?

  • 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-04T19:07:17+00:00Added an answer on June 4, 2026 at 7:07 pm

    Try this…

     tx.executeSql('INSERT INTO CLIENT (id,name, adress, notes) VALUES ("1","client1","adress1","note1")');
    

    See SQLite returned an error code of 14

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

Sidebar

Related Questions

I have a problem following from my previous problem . I also have the
I have following problem. I use this tutorial to creating a multiple file uploader:
I encountered following problem: I write program in c++ using VS2010. Debug build works
The following problem is taken from Problems on Algorithms (Problem 653): You are given
I have following problem with using cucumber and jRuby under windows: load error: bundler/definition
Given the following problem: Store the largest 5000 numbers from a stream of numbers
have following problem with validate checkbox array. The validation is bypassed, have taken the
The following problem: I want to upload files in a program, and the user
Following problem: I want to render a news stream of short messages based on
The following problem happens on both Safari and Chrome, so probably a WebKit issue.

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.