{ "id": "63026", "key": "TIMOB-2394", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-01-03T11:48:07.000+0000", "created": "2011-04-15T03:18:34.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T23:14:45.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "I'm having trouble saving data in the database created using a\r\ntextfield as follows:\r\n\r\n{code}\r\ncadvend.addEventListener('click', function(e)\r\n{\r\n\r\nvar base = Titanium.Database.install('cardsdb.db','cards');\r\nvar db = Titanium.Database.open('cards'); \r\n\r\ndb.execute('CREATE TABLE IF NOT EXISTS vendedor (idvendedor INTEGER PRIMARY KEY AUTOINCREMENT, nome VARCHAR(30) NOT NULL, cpf VARCHAR(30) NOT NULL UNIQUE, telefone VARCHAR(30) NOT NULL)');\r\n\r\ndb.execute('INSERT INTO vendedor (nome,cpf,telefone) VALUES (\"'tf1.value'\",\"'tf2.value'\",\"'tf3.value'\")');\r\n\r\n// main\r\nvar q = db.execute( 'SELECT * FROM vendedor' );\r\n\r\nif( q.rowCount == 0 ){\r\n loadData();\r\n}\r\nelse{\r\n var dataTable = [];\r\n var i = 0;\r\n\r\n while( q.isValidRow() ){\r\n dataTable[i] = Ti.UI.createTableViewRow({\r\n title : q.fieldByName( 'nome' ) + ':' + q.fieldByName( 'cpf' ) + ':' + q.fieldByName( 'telefone' )\r\n });\r\n\r\n i++;\r\n q.next();\r\n }\r\n q.close();\r\n\r\n VendWindow.add( table );\r\n table.setData( dataTable );\r\n}\r\n});\r\n{code}\r\nPlease if anyone knows how to save using textfield help me", "attachment": [], "flagged": false, "summary": "Problems with SQLite and Textfield", "creator": { "name": "luciano", "key": "luciano", "displayName": "luciano", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "luciano", "key": "luciano", "displayName": "luciano", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "177793", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Propose this be closed for the following reasons:\r\n\r\n* test case not complete\r\n* user not using recommended query syntax (ie with string substitution):\r\n* it's an issue more suited to the Q&A\r\n\r\n{code}\r\ndb.execute('INSERT INTO vendedor (nome,cpf,telefone) VALUES (\"'tf1.value'\",\"'tf2.value'\",\"'tf3.value'\")');\r\n{code}", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-01-02T17:21:50.000+0000", "updated": "2012-01-02T17:21:50.000+0000" }, { "id": "177875", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket so that it can be rerouted to Q&A. Ticket can be reopened if there is a valid test case demonstrating a legitimate bug in platform.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-03T11:47:44.000+0000", "updated": "2012-01-03T11:47:44.000+0000" }, { "id": "410955", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T23:14:45.000+0000", "updated": "2017-03-09T23:14:45.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }