不行 只能执行第一条db.execSQL("create table table1 (name varchar(20),pw varchar(20))");
运行下一条的时候程序就行退了!

解决方案 »

  1.   

    不行 只能执行第一条db.execSQL("create table table1 (name varchar(20),pw varchar(20))");
    运行下一条的时候程序就强退了!
      

  2.   

    id int
    整型应该用integer吧,不是int
      

  3.   

    应该不是这个问题吧,我试过了把int改为integer,还是不行,而且如果只有一句db.execSQL("create table table (id int,name varchar(20),pw varchar(20))");的话是运行正确的!
      

  4.   

    在 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
    {
    db.execSQL("create table sunCount(id integer primary key autoincrement,conut integer)");

    这里面创建  更新数数据库   再创建一张表  就可以了  创建表的方法 和开始一样 
    ...........
    this.helper = new SunDatabasehelper(Context);
    this.db = this.helper.getWritableDatabase();
    this.helper.onUpgrade(this.db, 1, 2);
    ........
    你懂得 不解释