Questions tagged [opendatabase]

openDatabase is a javascript/html5 function that allows for client local database storage

42 questions
9
votes
2 answers

SECURITY_ERR: DOM Exception 18 on openDatabase

I have a web-based Android app that uses WebSQL for storage. For some reason, calling openDatabase at one point (in response to a button click), causes a DOMException with the message "SECURITY_ERR: DOM Exception 18". Note that I am not using…
Goldsmith
  • 508
  • 7
  • 13
6
votes
3 answers

SQLite database: unknown error (code 14): Could not open database

I'm making an App that copies a db file from another App and then edits the db. When I try to open de SQLite db I get an error: android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database Tried a lot of…
Luciano Stupenengo
  • 183
  • 1
  • 1
  • 12
6
votes
1 answer

HTML5: accessing large structured local data

Summary: Are there good HTML5/javascript options for selectively reading chunks of data (let's say to be eventually converted to JSON) from a large local file? Problem I am trying to solve: Some existing program locally and outputs a ton of data. I…
Abrrval
  • 61
  • 2
5
votes
2 answers

SQLite static openDatabase database method error in Android

I created a static method to access my database on one of my activities but I keep getting error on opening the database. MainActivity public static String getStudentData() { SQLiteDatabase sampleDB = null; try { //NOT…
newbie
  • 958
  • 4
  • 13
  • 25
5
votes
1 answer

openDatabase Hello World

I'm trying to learn about openDatabase, and I think I'm getting it to INSERT INTO TABLE1, but I can't verify that the SELECT * FROM TABLE1 is working.
Phillip Senn
  • 46,771
  • 90
  • 257
  • 373
4
votes
1 answer

Returning a value from a nested function to it's parent without using a callback

I wrote the following function to check if my HTML5 openDatabase table is filled or empty: var that = this; that.db = openDatabase('dbname', '1.0', "description", 1024 * 1024); that.tableFilled = function( tableName ) { …
Pierre
  • 18,643
  • 4
  • 41
  • 62
4
votes
7 answers

javascript arguments anonymous function

Could someone please explain function(tx) in the code snippet below, from this page: http://www.webkit.org/demos/sticky-notes/. Where and how is tx assigned? I have looked here for information but am still in the dark. What I think I understand is…
Tim
  • 5,371
  • 3
  • 32
  • 41
4
votes
2 answers

Read a text file with JQuery and store in DataBase

I have a file containing 1 : "Benz" 2 : "Bmw" 3 : "Porche" 4 : "Ferrari" And I would like to read it with Jquery and store them in Local Database in OpenDataBase, with 1 will be a number of step and Benz will be the other field in data base. my…
joseva
  • 43
  • 5
4
votes
3 answers

Android 4.0.3, window.openDatabase doesn't work

I'm working on a mobile app, for that I use html5/js with Phonegap. I store some data in a local database with window.openDatabase(...). That's work fine with Android 2.x But when I try with Android 4.0.3, I catch the following error…
Vi.
  • 291
  • 3
  • 11
3
votes
1 answer

SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent

I am creating an application using cordova : openDatabase('testname', '1.0', 'Database display name', 5 * 1024 * 1024) I am using plugin to signin with facebook https://github.com/wizcorp/phonegap-facebook-plugin , after successfull login I am…
Nikesh
  • 31
  • 1
  • 4
3
votes
2 answers

Closures and callbacks

I'm working on a database function and need to return results from fetchAll so I can use it elsewhere in my code but am not sure how to do it: function fetchAll(sql,params,tableref){ var fields = new Array(); var resultout = new Array(); for…
user1018244
  • 113
  • 6
3
votes
1 answer

window.openDatabase throws TypeError: Object[object DOMWindow] has no method 'openDatabase' on Android

I'm using Sencha Touch 2.0.1 and am trying to open a SQLite Database using: var db = window.openDatabase("mydatabase", "1.0", "mydatabase", 2000000); On the iPhone/IOS Simulator this works. On an Android device or emulator I get an…
MattD
  • 73
  • 2
  • 6
2
votes
1 answer

SQLite openDatabase creating multiple databases

I'm using this very common line of code to create a HTML 5 local SQLite database: var db = window.openDatabase("testDB","1.0","A test SQLite database",20000); If the database already exists openDatabase should open it, however with each refresh of…
ThunderHorse
  • 365
  • 1
  • 4
  • 18
2
votes
0 answers

Are nationalities' local names stored in System.Globalization?

In our application the user can view the users, with their nationalities (demonyms). For now the nationalities are displayed in English. I would like to find a way to display those nationalities in the user's language instead of English. I searched…
2
votes
0 answers

Trying to open an indexedDB database and I get this Error: Invalid argument: idb_cmp1 does not match existing comparator : leveldb.BytewiseComparator'

I'm trying to open an indexedDB database using Python and I get this error: Error: Invalid argument: idb_cmp1 does not match existing comparator : leveldb.BytewiseComparator It seems I have to implement a comparator, but I don't know how to. Is…
1
2 3