Try changing
db.getWritableDatabase().update(tablename, update((buy+dupbuy)), (column2+"=? and"+ column3+"=?"),(new String[] {getdate}+" and"+new String[] {stockname}));
to
db.getWritableDatabase().update(tablename, update((buy+dupbuy)), (column2+"=? and "+ column3+"=?"),(new String[] {getdate,stockname}));
Add a space after the "and"
in the WHERE
clause and you need to pass a String[]
and not String
in the whereArgs
parameter. Currently you are passing a String