0
votes

Please any one know how to implement sqlite database in sencha touch. I want to save data in local database not in local storage. thanks in advance.

2
from local storage I mean store in sencha. - Swanand
Edit your question then, don't use comments. - Andrea Casaccia

2 Answers

1
votes

Sencha actually has it's own sql proxy since 2.1.

If your app isn't native, you won't be able to use sqlite, only websql which is subject to the 5mb local storage limit.

If your app is native, you will need to use phonegap with the Sencha sql proxy and a sqlite proxy. I fully recommend this as it works perfectly for me across both Android and iOS.

Here's a link to the cordova/phonegap plugin which is fully compatible with plugman: https://github.com/lite4cordova/Cordova-SQLitePlugin

Here's a couple of posts on my blog you might find useful with regards to sqlite/websql and Sencha Touch:

Fix to proxy to deal with arrays/objects fields: http://senchatouchdev.com/wordpress/2013/11/20/sqlite-fix-for-arrayobject-fields/

Difference between sqlite/websql and sencha touch: http://senchatouchdev.com/wordpress/2013/04/19/sencha-touch-clarifying-websql-sqlite-and-how-they-relate-to-sencha-touch/

-1
votes

There two way to do that:

  • Use a sqlLite Sencha Proxy (not existing by default sencha touch) with the help of tomalex0 sqlLite proxy.

or, if you intend to deploy your application on smartphones as a native application:

  • Use Sencha touch with PhoneGap API to Access the native database of the phone (needs some native programming) witch not very recommended.