但是当我用空格(或任何其他除数字)字符修改值时,
(例如“905331234567”),那没问题.
update frIEnd set phone = "+905331234567"; //905331234567update frIEnd set phone = " +905331234567";// +905331234567
感谢您的回复.
凯末尔.
编辑
创建字符串:
private static final String CREATE_FRIEND = // create table "create table " + FrIEndBean.DB_table_name + "(" + FrIEndBean.KEY_ROWID + " integer primary key autoincrement," + FrIEndBean.KEY_contactID + " String," + FrIEndBean.KEY_name + " String," + FrIEndBean.KEY_phone + " String," + FrIEndBean.KEY_accessCode + " String," + FrIEndBean.KEY_flag + " int " + ");";
插入方法:
public voID insertFrIEnd(FrIEndBean bean) { sqliteStatement statement = database.compileStatement(FrIEndBean.getInsertsql()); statement.bindString(1,bean.getContactID()); statement.bindString(2,bean.getname()); statement.bindString(3,bean.getPhone() +""); statement.bindString(4,bean.getAccessCode()); statement.bindLong(5,bean.getFlag()); long ID= statement.executeInsert();}
类:
public class FrIEndBean{ public static final String DB_table_name = "frIEnd"; public static final String KEY_contactID = "contactID"; public static final String KEY_name = "name"; public static final String KEY_phone = "phone"; public static final String KEY_accessCode = "accessCode"; public static final String KEY_flag = "flag"; ...
解:
String FIEldtype替换为Text.
引用
http://www.sqlite.org/datatype3.html
和
评论.
String FIEldtype替换为Text.
创建表朋友(rowID整数主键自动增量,
手机文字);
引用
> http://www.sqlite.org/datatype3.html>评论.
总结以上是内存溢出为你收集整理的如果字符串字段以加号()开头,则更新Sqlite表?全部内容,希望文章能够帮你解决如果字符串字段以加号()开头,则更新Sqlite表?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)