[TIMOB-13070] Blackberry: Add support for the install method in Ti.DataBase
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-07-25T22:41:52.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | 2013 Sprint 15 API, 2013 Sprint 15, Release 3.1.2, Release 3.2.0 |
| Components | BlackBerry |
| Labels | n/a |
| Reporter | Russell McMahon |
| Assignee | Pedro Enrique |
| Created | 2013-03-14T22:49:28.000+0000 |
| Updated | 2013-08-09T23:43:45.000+0000 |
Description
Attachments
| File | Date | Size |
|---|---|---|
| todo.sqlite | 2013-07-16T19:15:23.000+0000 | 65536 |
Attached is the todo.sqlite database file, place it in the Resources and use this code:
PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/131var win = Ti.UI.createWindow(); var btn = Ti.UI.createButton({ title: 'Install todo.sqlite' }); // item text // done int btn.addEventListener('click', function(){ var db = Ti.Database.open("todo.sqlite" /*, "otherName" */); var sSQL = "select * from todo"; var rows = db.execute(sSQL); Ti.API.info('Row count: ' + rows.rowCount); while(rows.isValidRow()) { Ti.API.info(rows.fieldByName('item')); rows.next(); } alert('completed!'); rows.close(); db.close(); }); win.add(btn); win.open();Verified the fix . The install method works & installs the sqlite database using the code. Thus closing. Environment: Appcel Studio : 3.1.2.201308082014 Ti SDK : 3.1.2.v20130808180613 Mac OSX : 10.8.4 Alloy : 1.2.0-alpha6 CLI - 3.1.2-alpha win 7 Win 8 Z10 BB simulator : 10.0.10.822 Z10 device running 10.0.10.88