Current filter:
                                You should refresh the page.
                                  • Hi,

                                    I am developing a Cross Platform Mobile Application (Currently targeting Android and iOS) using Microsoft Visual Studio 2012 as the IDE.
                                    In this App, I require an Offline Relational Database which will store data related to the App.
                                    Currently, I think the only appropriate solution is SQLite.
                                    Can you provide me with a Simple Demo of SQLite with CRUD operations.

                                    Thanks.

                                1 Solution

                                Creation Date Importance Sort by
                                There are two ways to use SQLite in a JavaScript application.

                                You can use Web SQL Database. Safari and Opera’s local databases are based on SQLite. You can use the following resources to get started:
                                Getting Started with HTML5 Local Databases - This blog provides examples demonstrating how to setup the database, build the table, select the data, make updates, drop the table. Take a special note of the pros and cons provided at the end of the blog.
                                HTML5 - Web SQL Database - This article provides examples demonstrating how to open the database and execute insert and read operations.
                                A Simple TODO list using HTML5 WebDatabases - The subject heading of this article is self-descriptive

                                Please note that at present, the Web SQL Database specification is no longer in active maintenance and the Web Application Working Group does not intend to maintain it further. You can find more details in the Web SQL Database Specification.

                                If the application will be distributed as a native package using PhoneGap framework, you can utilize the corresponding plugin: SQLitePlugin. The plugin documentation describes how to use it: Cordova/PhoneGap SQLitePlugin - a reference implementation. If you want to build packages using DevExtreme tools for Visual Studio, read these Knowledge Base articles:
                                How to add PhoneGap plug-in for Android to a DevExtreme project
                                How to add PhoneGap plug-in for iOS to a DevExtreme project
                                • Pranay 10.21.2013

                                  Hi Alex,

                                  WebSQL/SQLite is deprecated and no longer supported.
                                  IndexedDB do not support iOS Safari.
                                   Do you think is there any other option/alternative for Offline Relational Database which runs on Mobile Platforms?
                                  You will be on the Mobile Platform from quite a long time and I hope you might know better!!!!!

                                • Alex Skorkin (DevExpress Support) 10.22.2013

                                  Hello Pranay,

                                  Thank you for the clarification. In this case, you might want to use the local store that can persist any objects for further offline usage.

                                  Let me know if I can be of further assistance.

                                • Pranay 10.23.2013

                                  Hi Alex,

                                  Let us assume that I am going on with WebSQL DB which is no longer supported. Its fine with me if it is no longer supported.

                                  Now to utilize Phonegap API, I just need to include the following line:
                                  <script type="text/javascript" src="cordova.js"></script>
                                  and when I would build the App, it would be automatically included in the Project. Right?

                                  Correct me if I am wrong.
                                  WebSQL is equivalent to Phonegap Storage API. Right?

                                  Phonegap documentation is based on Android and iOS SDK integrated with Eclipse and its difficult for me to implement the Stotage API in my App. I tried but failed.

                                  Can you please provide me with a simple Demo of utilizing Phonegap Storage API (WebSQL Database if I am not wrong) including Creating, Inserting and Updating a Table/Records?

                                  Any help would be greatly appreciated.

                                • Alex Skorkin (DevExpress Support) 10.23.2013

                                  Hello Pranay,

                                  If you are using the Basic Application template, then you need to manually add a link to the cordova.js file. In a Multi-channel application, this link is added automatically.

                                  I'm afraid that I'm not familiar with the PhoneGap Storage API. Try using the sample provided in the following thread:

                                  Chapter 22: Storage API