How to open existing database in websql

1.9k views Asked by At

I want to connect to sqlite existing database in Javascript via WebSql. I follow this question and my problem not resolved.

I did following :

  1. copy my sqlite database beside of the "index.html"
  2. in the "index.html", I add below code :

    db = openDatabase('filename.sqlite', '', 'my first database', 2 * 1024 * 1024);
    

When I open "index.html", on chrome developer tools and "Resources" tab, an empty database created with a "filename.sqlite" name. In fact, a new database created!

Any suggestion?

0

There are 0 answers