View Full Version : save data in Iphone database
22 Sep 2010, 9:34 PM
I'm just starting to use sencha touch to develop applications. Well, I have this form in which you can fill in certain fields and if I save it, I want it to be saved in a text file or any database and at the same time retrieve the data from it. I have read the api documentation and it seems there is no information about this. Is there a way to do this?
22 Sep 2010, 11:05 PM
Yes, but not directly. You need some layer in between (php, ruby, .net) that interacts with the DB.
You would use an Ajax request to send/receive data from the server.
22 Sep 2010, 11:14 PM
I mean the database file is inside the iphone itself. I'm planning to create a app in which the user can update informations and save it in that database when he is offline and sync the database to the server when he's online.
22 Sep 2010, 11:16 PM
Oh right, then yes. Look at the LocalStorageProxy.
23 Sep 2010, 5:15 AM
Is it possible that you can use database such as sqlite or any other database storage in sencha? I want to see the file so that I can validate the data saved in it.
23 Sep 2010, 6:24 AM
lukeHeather, I wouldn't ever trust the client. There is no encryption that I know of available for client side SQLite storage. But that isn't much of a concern if we consider that the phone is locked, the mobile browser is in a sandbox and the data they type in is their's. Trust the user vs don't trust the user. If there is encryption a like to an example would be appreciated.
Can SQLite mobile store a BLOB(file)? If so a link to an example would be appreciated.
28 Sep 2010, 3:08 AM
From what I've learned from Sencha, there is no dirrect support to sqlite database.
You have to use a php script and then call it in ajax to use sqlite database in the mobile.
But from the need of lukeHeather123, it should just use a simple localstorage with synch.
28 Sep 2010, 11:49 PM
Thank you for your replies. I'll try all the suggestion posted and post back if something comes up.
29 Sep 2010, 3:23 AM
Take a look at the form demo by tomalex in the showcase section of the forum. It uses the browser database.
Powered by vBulletin® Version 4.1.5 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.