jhubert / javascript-sqlite

A very simple javascript layer for a browser based SQLite database.
53 stars 18 forks source link

How to open an existing local database #2

Open galders opened 10 years ago

galders commented 10 years ago

Hello,

I would like to use my existing SQLite database. How can I use your library to open the existing local SQLite database (i will use it for a HTML5 type mobile app).

Thank you in advance. I don't know if this is the right place, but I had not found any other one.

I'm trying something like:

var db = SQLite({ shortName: 'mydatabase.db', defaultErrorHandler: fail, defaultDataHandler: pass });

db.select('mytable', '*');

Thanks again.

jhubert commented 10 years ago

Hi @galders,

I'm sorry I just saw this notification. That should be how to do it. Is that not working for you? Were you able to solve this?

fredflyer commented 9 years ago

Hi, i'm trying to use the script, but it seems taht my file.db not opening as i have after a select a message saying "Oops. could not prepare statement (1 no such table: Pagecdv) (Code 5)" my html is in a directory www, and my file.db too... what can be the problem ? thank you for your help Fred