[TIMOB-82] isValidRow() - error for 0 rows
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2011-04-17T01:51:55.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | n/a |
| Reporter | Samir |
| Assignee | Blain Hamon |
| Created | 2011-04-15T02:23:27.000+0000 |
| Updated | 2011-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(); }
(from [9d45d6a85f17583f3658bef8fd7e11d0e2c55fac]) RESOLVED #82 http://github.com/appcelerator/titanium_mobile/commit/9d45d6a85f17583f3658bef8fd7e11d0e2c55fac"> http://github.com/appcelerator/titanium_mobile/commit/9d45d6a85f175...
I was checking for null, and not for null and undefined.