{ "id": "63593", "key": "TIMOB-2961", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11258", "description": "Holding Pen for Triaged Issues", "name": "Backlog", "archived": false, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-06-22T14:23:29.000+0000", "created": "2011-04-15T03:33:48.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "blackberry", "defect" ], "versions": [ { "id": "11206", "description": "", "name": "BB Preview 2", "archived": true, "released": true, "releaseDate": "2011-05-03" } ], "issuelinks": [], "assignee": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-02T21:44:28.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10230", "name": "BlackBerry", "description": "BlackBerry Platform" } ], "description": "{html}

Problem

\n

The database paramater binding is incorrect on Blackberry. It\nalways binds the parameters to the 0th index, instead of to the\n\"i\"th index.

\n

Existing Source

\n

The binding is done in the following function:

\n
\nprivate void bindStatementArguments(Statement st, String[] args)\n    {\n        for (int i = 0; i < args.length; i++) {\n            try {\n                st.bind(i + 1, args[0]);\n            } catch (DatabaseBindingException e) {\n                Log.e(TAG, \"Exception while binding statement argument with index \" + i + \": \" + e.getMessage());\n            } catch (DatabaseException e) {\n                Log.e(TAG, \"Statement object was not prepared for binding: \" + e.getMessage());\n            } \n        }\n    }\n
\n

In the fifth line of that block, notice that st.bind is called\non 1+1 and args[0]. args[0] should be args[i].

\n

CLA

\n

A client contributed this fix, accessible through the associated\nhelpdesk ticket below. We may need to get him to sign the CLA,\ngiven that this fix came from him.

\n

Associated Helpdesk Ticket

\n

http://developer.appcelerator.com/helpdesk/view/68791

{html}", "attachment": [], "flagged": false, "summary": "Blackberry: Database parameter binding incorrect", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "408569", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as Blackberry is no longer supported.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-02T21:44:28.000+0000", "updated": "2017-03-02T21:44:28.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }