object-layer / cordova-sqlite-plugin

Cordova SQLite plugin with a straightforward low-level API
Other
5 stars 15 forks source link

Unable to run on Windows Phone 8 project in Visual Studio #2

Closed sumitsoman closed 8 years ago

sumitsoman commented 8 years ago

I added the cordova-sqlite-plugin v 1.0.0 to a cordova v5.2.0 project with wp8 platform.

The sample code provided does not produce the output. Could you suggest? I call this function on a button click.

function myFunction() { var SQLite = window.cordova.require('cordova-sqlite-plugin.SQLite');

var sqlite = new SQLite('example');

sqlite.open(function (err) {
    if (err) throw err;
    sqlite.query('SELECT ? + ? AS solution', [2, 3], function (err, res) {
        if (err) throw err;
        alert("Hello");
        alert(res.rows[0].solution);
    });
});

sqlite.close(function (err) {
    if (err) throw err;
});

alert('ok');

}

The "ok" alert is displayed but not the "Hello".

mvila commented 8 years ago

I am sorry but since I don't have a Windows environment, I'm afraid I can't help you. This plugin is a fork of cordova-sqlite-storage , so maybe you would try the original plugin and see if you have the same problem. I would be interested by your result.

sumitsoman commented 8 years ago

I am able to install the cordova-sqlite-storage plugin but am unable to run the test script (the quick installation test shown at the link https://github.com/litehelpers/Cordova-sqlite-storage). The app launches on the emulator but no output or error on console is shown. Could you have a look at the attached html and js files I am using to test and see if there is anything to be changed?

myTestJS.txt indexHTML.txt

mvila commented 8 years ago

I don't see what's wrong in your code but since it is about the cordova-sqlite-storage plugin, I suggest you to post your issue there.

sumitsoman commented 8 years ago

I have posted it there as well (https://github.com/litehelpers/Cordova-sqlite-storage/issues/412). Are there any permissions that need to be enabled through code/ on the device?

mvila commented 8 years ago

I am sorry but being unfamiliar with the Windows environment, I can't be of much help.