Select Row for checking of duplicate Key.********* Transaction.executeSql(sqlC,, nullDataHandler, errorHandler) Var sqlC='CREATE TABLE IF NOT EXISTS Wine_Table(id INTEGER NOT NULL PRIMARY KEY, key TEXT, color TEXT,date TEXT,heading TEXT,img_Path TEXT,name TEXT,price TEXT,whr TEXT,notes TEXT) ' create tables for the database ************ Mydb = openDatabase(shortName, version, displayName, maxSize) Var displayName = 'PhoneGap Test Database' I have used this to implement data base in phonegap using sqlite : document.addEventListener("deviceready",onDeviceReady,false) ĮrrorHandler = function (transaction, error) Still just as valid for PhoneGap as for desktop browsers. I think that the best introductionary text on that topic can be found in Mark Pilgrim's "Dive into HTML5": Web SQL databases are one implementations of what's more broadly referred to as "local storage". It will work exactly the same in PhoneGap as in desktop browsers. In Chrome or Safari, you can go have a look at it's contents with your developer tools, look at the 'Resources' tab -> Databases (you want to test out basic functionality on a desktop browser before trying in PhoneGap). In reality, it's based on SQLite in most browsers that support it, but it won't be exactly the SQLite implementation. You want what's called a 'Web SQL Database'.Įdit: This specification has been marked as deprecated since the writing of this answer and it's now an officially Bad Idea™ to depend on it. Everything that applies to mobile WebKit will apply to PhoneGap as well, and the environment in PhoneGap is also very similar to opening an HTML-file in a desktop browser. It's important to remember that PhoneGap is web apps packaged in a browser component. Unfortunately, the plugin doesn't provide exactly the same javascript interface as the browser, but it's fairly close. So we went with using the PhoneGap SQLite plugin instead: This allowed us to include a large pre-populated sqlite3 database in our app and access it from javascript via the plugin. However, in our latest attempt to submit the app, we were told the app violated iOS Data Storage Guidelines, presumably because it was copying the database file to a non-standard location. We initially worked around this issue by copying a pre-populated sqlite3 database to a special directory where it would be picked up by WebKit (e.g. Pre-populating the database via javascript adds to initial app load time.Size of database is limited to 5MB (the user can be prompted to allow more, but we didn't want such prompts in our app).We started off using a plain old Web SQL Database in our PhoneGap app, but ran into the following limitations: Please refer to the Website Terms of Use for more information in this regard.We ended up using the PhoneGap SQLite plugin, here's why: Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the Website Terms of Use for more information in this regard.Ĭonfindential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Disclaimer: The information provided on and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |