就像标题一样,我无法将电子邮件地址键入 SQLite 数据库。错误如下:
02-01 09:49:52.300: I/SqliteDatabaseCpp(16157): sqlite returned: error code = 1, msg = near "@gmail": syntax error, db=/data/data/com.proj.db/databases/FormDetails
创建数据库没有任何问题,只是最近我将其添加到电子邮件列中,然后出现此错误。是因为“@”符号无法键入数据库吗?
我的表格代码:
String insertNewFormDetails = "create table if not exists " + TABLE_NAME + " ( " + BaseColumns._ID + " integer primary key autoincrement, "
+ NAME + " text not null, "
+ SCHOOL + " text not null, "
+ CURRENTDATE + " text not null, "
+ FORMTYPE + " text not null, "
+ EMAIL + " text not null);";
db.execSQL(insertNewFormDetails);