im new to Appcelerator Titanium. I have successfully created DB. when i tried to insert a record it shows an error,
[ERROR] Script Error = Error occurred calling next on a PLSqliteResultSet.
SQLite error: 'constraint failed' for 'INSERT INTO test (t_Id, t_Name)
VALUES (1,"sam")')' at app.js (line 24).
my code is:
Ti.Database.install('myDB.sqlite','myDB');
var db = Ti.Database.open('myDB');
db.execute('INSERT INTO test (t_Id, t_Name) VALUES (1,"sam")');
Please help me!!
do it like this.
this is to add dynamic values. username password and token are variables here.