database - how to open sqlite3 db through javascript? -


i using https://github.com/kripken/sql.js plugin open sqlite db js

<script> function print(text) {   var element = document.getelementbyid('output');   element.innerhtml = text.replace(/\n/g, '<br>'); }  var db = sql.open('fixtures/db/development.sqlite');  // run command in database function execute(commands) {   try {     var data = db.exec(commands.replace(/\n/g, '; '));     print(json.stringify(data, null, '  '));     print(data);   } catch(e) {     print(e);   } } 

, getting error "sqlite exception: 26, file encrypted or not database". there problem opening sqlite file?

grant web server access folder storing sqlite file.

for example, if iis, grant user 'iis apppool\defaultapppool' modify access sqlite database file or containing folder. user doesn't show in user searches, if paste name , click 'check names' when granting privileges using windows explorer allow user selected.

if apache, you'll need consider chmod change permissions.

for both web servers file extension needs allowed. in iis, may need add mimetype .sqlite.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -