Sqllite doesn' write a column
Posted
by
user1904675
on Stack Overflow
See other posts from Stack Overflow
or by user1904675
Published on 2012-12-14T17:01:53Z
Indexed on
2012/12/14
17:03 UTC
Read the original article
Hit count: 200
android
I do this:
DatabaseHelper dbHelper = new DatabaseHelper(context);
dbHelper.getWritableDatabase();
String sql = "insert into "+getTableName()+("+DatabaseHelper.PRODUCT_MARK+","+DatabaseHelper.PRODUCT_NAME+") VALUES ('"+input.getMark()+"','"+input.getName()+"')";
System.out.println(sql);
getDatabase().execSQL(sql);
dbHelper.close();
The system print
12-14 16:53:33.857: I/System.out(1350): insert into product (pMark,name) VALUES ('aaaaa ','zz')
But when I read from db the property mark is not valorized... Where is my mistake?
© Stack Overflow or respective owner