the verified sqlite plugin doesn't works

2 posts, 0 answers
  1. Hamza
    Hamza avatar
    1 posts
    Member since:
    Apr 2016

    Posted 14 Apr 2016 Link to this post

    Hi guys ,

    im developping an cross-platforms app (with latest cordova version) and i'm using your verified sqlite plugin i installed it via CLI as written in the documnetation .
    when i try to open the database and make sure the table is created and if has some data i can't and in the console i don't get any error except (DB opened !! no error nothing this is my code :

    1.db = window.sqlitePlugin.openDatabase({name: "products.db",location: 'default',androidLockWorkaround: 1},function(tx)     db.transaction(function(tx) {         tx.executeSql('CREATE TABLE IF NOT EXISTS products (id integer primary key, product_id INTEGER,title text,price text, picture text,quantite INTEGER)'),function(tx,res){alert(res)}, function(e) {             alert('error: ' + e.message);}});

    and evenif i try to check if something is there i don't get any error any message :
    2.        tx.executeSql("SELECT count(id) as cnt FROM products"),
    3.        function(tx,res){
    4.            alert(res.rows.item(0).cnt);
    5.        }, function(e) {
    6.            showNotification('error: ' + e.message);
    7.        }
  2. Tsvetina
    Tsvetina avatar
    2107 posts

    Posted 19 Apr 2016 Link to this post

    Hi Hamza,

    What OS are you testing the example on. Please note that if you are using Windows Phone, the SQLite plugin no longer supports it. You need to use the legacy version of the plugin:
    Cordova/PhoneGap sqlite storage adapter (legacy version)

    or use version 1.0.6 of the verified plugin.

    If the problem isn't related to WP, please consider opening a support ticket and sending us your project, so we can debug it locally. 


    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

Back to Top