Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13070] Blackberry: Add support for the install method in Ti.DataBase

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-07-25T22:41:52.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 15 API, 2013 Sprint 15, Release 3.1.2, Release 3.2.0
ComponentsBlackBerry
Labelsn/a
ReporterRussell McMahon
AssigneePedro Enrique
Created2013-03-14T22:49:28.000+0000
Updated2013-08-09T23:43:45.000+0000

Description

Attachments

FileDateSize
todo.sqlite2013-07-16T19:15:23.000+000065536

Comments

  1. Pedro Enrique 2013-07-16

    Attached is the todo.sqlite database file, place it in the Resources and use this code:
       var 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();
       
    PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/131
  2. Lokesh Choudhary 2013-08-09

    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

JSON Source