Can you please provide the simple database examples with SELECT, INSERT with SQLITE in titanium android environment?
I've checked the below sample:
While trying this sample, i found that inserted records are not updated in the SQLite Manager as Firefox add-on. I am bit confused where to find the updated records.
I need your guidence!!!
Thanks, Balu C
If I understand the question right, you are creating an android mobile project, and hoping to use the firefox addon to examine database changes as your project runs in the emulator. Is that right?
I don't think you will be able to do that. As this describes, the android emulator stores the user data in an image file. The application database will just be part of the binary data within that image. Thus there is no path where you can point to a database file to open within SQLite Manager.
You have a few alternatives:
- Use appcelerator code to run more SQL statements and output the results
- Use the sqlite3 tool from a command line as explained here
- Use iOS instead of android. The iOS simulator does store each file in the OSX filesystem, so you are able to use the SQLite Manager addon in firefox to examine application databases in the manner which you want (if I understand the question right, that is)
If you try the iOS route, I recommend always only opening and closing the simulator's database as needed while examining data. Your app won't be expecting another process to have the database open, and sqlite3 is not well behaved when multiple processes have the database open at once. You can introduce various lock conditions. However, I have used this technique to examine and even modify a database used by an application running in the simulator. In iOS, the path to the database will be something along the lines of /Users/(username)/Library/Application Support/iPhone Simulator/4.1/Applications/(app guid)/Library/Application Support/database
If you can't use the iphone simulator, check out the sqlite3 tool.
The records are updated on your mobile/tablet device and you can't see that with FF addon. After inserting, try to select data to see did insert went OK.
Think you can help? Login to answer this question!