Software Archive
Read-only legacy content
17061 Discussions

Adding Third party plugin itehelpers/Cordova-sqlite-storage showing 'sqllite-connector.jar' file not find

kulkarni__sameer
Beginner
405 Views

I am developing app using sqlite plugin. while fetching plugin from github link it's shwing that sqlite-connector.jar file not found.I am not getting why this is showing or is there any suitable method for local database better than sqlite.Please help me.

 

Regards 

Sameer Kulkarni

0 Kudos
4 Replies
PaulF_IntelCorp
Employee
405 Views

Please carefully read this section of the README on that plugin's github repo. This plugin can only be used with Cordova CLI. The last version that worked with either PhoneGap Build or the XDK build system was version 1.2.2.

0 Kudos
Phil_P___Pete_
New Contributor I
405 Views

Not sure why you're using the plugin, SQLLite is built in natively and works pretty well. (I have 4 apps using the native functionality). Some features are a little trickier than you might think but that's about the only issue.

IF you really feel the need to use the plugin, I'd suggest downloading it and then adding it via the 3rd party option.  Note though that some plugins won't unzip because the path is too long.

0 Kudos
kulkarni__sameer
Beginner
405 Views

Phil P. (Pete) wrote:

Not sure why you're using the plugin, SQLLite is built in natively and works pretty well. (I have 4 apps using the native functionality). Some features are a little trickier than you might think but that's about the only issue.

IF you really feel the need to use the plugin, I'd suggest downloading it and then adding it via the 3rd party option.  Note though that some plugins won't unzip because the path is too long.

As your suggestion , now plugin is added .i tried sample code from github but it's not working only showing OPEN database: my.db in debugger but in emulator and app preview not showing anything . I don't know where i made mistake .Please help me.code snippet as below.

document.addEventListener('deviceready',onDeviceReady,false);
function onDeviceReady(event)
{
   var x= document.getElementById('alert');
    x.innerHTML="Hari Om";
    //navigator.notification.alert("Har Om");
    window.sqlitePlugin.selfTest(function() {
    console.log('SELF test OK');
        x.innerHTML="Test ok";
        navigator.notification.alert("Har Om");
  });
    
   
    var db = window.sqlitePlugin.openDatabase({ name: 'my.db', location: 'default' }, function (db) {
                    navigator.notification.alert("Har Om");
                                // Here, you might create or open the table.
                     db.transaction(function (tx) {
    // ...
    tx.executeSql('CREATE TABLE customerAccounts (firstname, lastname, acctNo)');
}, function (error) {
    console.log('transaction error: ' + error.message);
                          navigator.notification.alert(error.message);
}, function () {
    console.log('transaction ok');
                          navigator.notification.alert("ok");
});
        

          }, function (error) {
                    console.log('Open database ERROR: ' + JSON.stringify(error));
         navigator.notification.alert("ok");
          });
    
    
}

 

0 Kudos
Reply