This is a migrated thread and some comments may be shown as answers.

No records stored with SQLite on Windows Phone 8.1 device

3 Answers 40 Views
AppBuilder extension for Visual Studio
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gilbert van Veen
Top achievements
Rank 1
Gilbert van Veen asked on 28 Dec 2015, 03:06 PM

Hi,

I use the latetst Appbuilder extension (V. 2015.4.1127.4), Cordova version 3.7.0 and additional plugin Brodysoft SQLitePlugin 1.0.6. (installed via Plugins Marketplace).

I've developed an app with the Kendo mobile UI and all functions works on Apple and Android devices (via Building in Cloud in the Appbuilder-menu) just fine. Only storing records on a WP8.1 device doesn't seem to work.

I debugged the app step-by-step and finally at the 'onSucces' and 'onError' -handling of the database-transaction I've put some alerts to show me (on the device)what event fires up. The 'onSucces'-event fires up and the value of the internal 'insertId'-variable changes. Only the value of the recordcount-variable is 0 all the time. Even I do an another insert-transaction.

What can I do to function this on WP8.1 like the other type of devices (Apple, Android) ? 

 

With regards,

Gilbert van Veen

 

Piece of code I used to debug the transaction:

function insertRecord(_a, _b, _c, _d, _e, _f, _g, _h, _i, _j) {
app.db.transaction(function (tx) {
tx.executeSql("INSERT INTO mytable (a, b, c, d, e, f, g, h, i, j, added_on) VALUES (?,?,?,?,?,?,?,?,?,?,?)",
[
_a,
_b,
_c,
_d,
_e,
_f,
_g,
_h,
_i,
_j,
new Date()
],
function (tx, res) {  alert(res.insertId); alert(res.rows.length);  },     // onSucces
function (e) {  alert("ERROR: " + e.message);  }                            // onError
);
});
}

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 30 Dec 2015, 09:42 AM
Hello Gilbert,

I tested on the SQLite sample app and when deploying on WP 8.1 device, each record added was saved as expected. Based on the notes you shared, I also tried modifying the onSuccess function as follows:
app.onSuccess = function(tx, r) {
    app.refresh();
    alert(r.insertId + " " + r.rows.length);
}

The result I got on both Android and WP devices was that the insertId changed based on the number of inserted records and the length of the rows was always 0.

Would you please confirm whether the demo also works fine for you? If so, then would you please elaborate on further details regarding what you have implemented differently in the app you develop. If you could share with us a demo app illustrating the error, then we will debug it locally to verify the exact case? Please note you can share those details on the case in a new support ticket so that this information to be kept privately.  

As a side note, there was a similar issue, back in April though, and it was resolved back then, so the latest version of the plugin is expected to work fine. 

Regards,
Dimitrina
Telerik
 

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

 
0
Gilbert van Veen
Top achievements
Rank 1
answered on 31 Dec 2015, 11:03 AM

Hi Dimitrina,

I already used the Sqlite sample-app to test on all kind of devices and even on my WP8-device (a Microsoft Lumia 640) this app works fine.

But in my app doesn't store record in WP8, just only on a Android or iOS-device.

 Probably there is a limitation on WP8-device I'm not aware off....

I think I have to  find another solution for storing data in case of WP8-devices. 

 

With regards and best wishes for 2016,

Gilbert.

0
Dimitrina
Telerik team
answered on 05 Jan 2016, 10:00 AM
Hi Gilbert,

Since in Telerik Platform you can build various mobile applications leveraging Cordova, you can also review other Cordova plugins which would work better for you. As to benefiting from the verified SQLite, if you can send us a sample app illustrating the issue accompanied with detailed guidelines on how to reproduce the problem, we will debug it locally and will be glad to communicate the case further.

You can share those details about your case in a new support ticket so that this information to be kept privately.  

Regards,
Dimitrina
Telerik
 

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

 
Tags
AppBuilder extension for Visual Studio
Asked by
Gilbert van Veen
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Gilbert van Veen
Top achievements
Rank 1
Share this question
or