title: How to populate database using SQLitePlugin Cordova in android?
body: <p>I have copied "demo.db" file to /data/data/package_name/databases/ as Gaurav suggested:
      visit: <a href="http://gauravstomar.blogspot.com/2011/08/prepopulate-sqlite-in-phonegap.html" rel="nofollow">http://gauravstomar.blogspot.com/2011/08/prepopulate-sqlite-in-phonegap.html</a></p>
  
  <p>"demo.db" has already created tables(e.g: Projects)</p>
  
  <p>I try to connect to connect to "demo.db" by using SQLitePlugin <a href="https://github.com/chbrody/Cordova-SQLitePlugin/" rel="nofollow">https://github.com/chbrody/Cordova-SQLitePlugin/</a></p>
  
  <p>I have installed this plugin as suggested by the developer of this Plugin.</p>
  
  <p>In my .js section, after firing the "deviceready" event, i have done by following:</p>
  
  <pre><code>var db = window.sqlitePlugin.openDatabase("demo", "1.0", "my demo", 500000);
  db.transaction(function(tx){
  tx.executeSql('INSERT INTO Projects (ProjectCode, ProjectDescription) VALUES(?,?)',["Lastly", "fdgsdfgsdg"], function(tx, result){
      tx.executeSql('SELECT * FROM Projects',[],function(tx, result){
          alert("projects");
          for (var i=0; i&lt;result.rows.length; i++){
          alert("Row = " + i + " ID = " + result.rows.item(i).ProjectId +  "ProjectCode =  " + result.rows.item(i).ProjectCode);
         } 
         hideLoading();
      });
  }, function(err) {//error callback function.
      alert("Database is not created.");
      hideLoading();
  }); 
  </code></pre>
  
  <p>In my case, instead of using the imported "demo.db", the SQLitePlugin has created the new database"demo.db" by overriding the imported db. When the insert code is executed,it throw the error,"error:no such tables:Projects". Due to this, error callback function is triggered. Please suggest me to solve my issue. </p>