storesafe / cordova-sqlite-storage

A Cordova/PhoneGap plugin to open and use sqlite databases on Android, iOS and Windows with HTML5/Web SQL API
Other
2.14k stars 713 forks source link

DB not opening on oneplus7t Pro, Vivo V2050, RealMe 7i #984

Open sociomarker opened 2 years ago

sociomarker commented 2 years ago

`var db = null;

function getsqliteDatabase() {

            var db = window.sqlitePlugin.openDatabase({ name: "india", location: 'default', createFromLocation: 1 });

            var colName = tableCol + '-dialist';

    db.transaction(function(tx) {

                    tx.executeSql("select * from [" + colName + "];", [], function(tx, res) {   

            var s = "";

            for (var i = 0; i < res.rows.length; i++) {
                s += '<a href="b.html?type='+ type +'&table=' + tableCol + '&diaid=' + res.rows.item(i).id +  '&dia=' + res.rows.item(i).dia +'" class="deco btn btn-primary btn-lg btn-block">'+ res.rows.item(i).dia +'<span style="text-transform:lowercase"> '+ type1 +'</span></a>';
                                    //console.log(res.rows.item(i).dia);
                                    //s += '<p class="buttons-row"><a href="b.html?pg=bpg&type=' + type1 + '&table=' + tableCol + '&diaid=' + res.rows.item(i).id + '&dia=' + res.rows.item(i).dia + '" class="button button-fill button-raised color-orange"><b>' + res.rows.item(i).dia + ' <span style="text-transform: lowercase">' + type2 + '</span></b></a></p>';
            }

                            console.log(s);
            //$('.wc-counts').append(s);
            document.getElementById('wc-counts').innerHTML = s;
        });
    });
}

function onDeviceReady() {
    //checkConnection();
    getsqliteDatabase();

}`
brodybits commented 2 years ago

My apologies for the delay. I would really need a full reproduction app, likely based on https://github.com/brodybits/cordova-sqlite-test-app and some more information such as which Android version.