java - Why are there error codes in my SQLite db files -
i'm making app include adding data database.after run app , input data want check if data has been added db. my.db3 file shows: sqlite format 3 , error codes
here code(theinputbutton):
add.setonclicklistener(new onclicklistener() { @override public void onclick(view v) { string smiles=miles.gettext().tostring(); string sdate=date.gettext().tostring(); string sprice=price.gettext().tostring(); string scosts=costs.gettext().tostring(); try{ db.execsql("insert fuelcost values('" + smiles + "','" +sdate + "','"+sprice+"','"+scosts+"')"); } catch(sqliteexception e) { db.execsql("create table fuelcost(miles vachar(10) primary key,date varchar(10),price varchar(10),costs varchar(10))"); } } });
Comments
Post a Comment