Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-82] isValidRow() - error for 0 rows

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:51:55.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterSamir
AssigneeBlain Hamon
Created2011-04-15T02:23:27.000+0000
Updated2011-04-17T01:51:55.000+0000

Description

When iterating through a database resultSet object, isValidRow() doesn't return properly if there are 0 rows. The following example causes an error:

var rows = db.execute('SELECT * FROM DATABASETEST');
var count = 0;
while (rows.isValidRow())
{ count++; rows.next(); }

Comments

  1. Jeff Haynie 2011-04-15

    (from [9d45d6a85f17583f3658bef8fd7e11d0e2c55fac]) RESOLVED #82 http://github.com/appcelerator/titanium_mobile/commit/9d45d6a85f17583f3658bef8fd7e11d0e2c55fac"> http://github.com/appcelerator/titanium_mobile/commit/9d45d6a85f175...

  2. Blain Hamon 2011-04-15

    I was checking for null, and not for null and undefined.

JSON Source