如何解决android.database.sqlite。SQLiteException:没有此类列:ttd(代码1)

时间:2022-01-23 23:03:07

i have one database and one table with 85 fields, when i want to add one column named :"ttd", i got an eror, when i delete "ttd" there is no eror, i have check my code, but i think nothing eror, this is my code :

我有一个数据库和一个包含85个字段的表,当我想添加一个名为“ttd”的列时,我有一个eror,当我删除“ttd”时,没有eror,我检查了我的代码,但我认为没有eror,这是我的代码:

class DBSpaj extends SQLiteOpenHelper {
    private static final String DATABASE_NAME="dbspaj.db";
    private static final int SCHEMA_VERSION=1;

    public DBSpaj(Context context) {
        super(context, DATABASE_NAME, null, SCHEMA_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL("DROP TABLE IF EXISTS table_spaj");
        db.execSQL("CREATE TABLE if not exists table_spaj (_id INTEGER PRIMARY KEY AUTOINCREMENT," +
                " agama TEXT,"+
                " agamatt TEXT,"+
                " alamat TEXT,"+
                " alamat_tt TEXT,"+
                " alamat_tagihan TEXT,"+
                " alamat_tagihan_tt TEXT,"+
                " alamatkantor TEXT,"+
                " alamatkantor_tt TEXT,"+
                " anak1 TEXT,"+
                " anak1_tt TEXT,"+
                " anak2 TEXT,"+
                " anak2_tt TEXT,"+
                " anak3 TEXT,"+
                " anak3_tt TEXT,"+
                " edit_bukti TEXT,"+
                " edit_bukti_tt TEXT,"+
                " edit_bulan TEXT,"+
                " edit_bulan_tt TEXT,"+
                " edit_ibu TEXT,"+
                " edit_ibu_tt TEXT,"+
                " edit_nama_pp TEXT,"+
                " edit_nama_tt TEXT,"+
                " edit_nomor TEXT,"+
                " edit_nomor_tt TEXT,"+
                " edit_tahun TEXT,"+
                " edit_tahun_tt TEXT,"+
                " edit_tanggal TEXT,"+
                " edit_tanggal_tt TEXT,"+
                " edit_ttl TEXT,"+
                " edit_ttl_tt TEXT,"+
                " edit_warga_negara TEXT,"+
                " edit_warga_negara_tt TEXT,"+
                " email_tt TEXT,"+
                " email TEXT,"+
                " hp TEXT,"+
                " hp_tt TEXT,"+
                " klasifikasi_industri TEXT,"+
                " klasifikasi_industri_tt TEXT,"+
                " klasifikasi_pekerjaan TEXT,"+
                " klasifikasi_pekerjaan_tt TEXT,"+
                " kode_telepon TEXT,"+
                " kode_telepon_tt TEXT,"+
                " kode_telepon_kantor_tt TEXT,"+
                " kode_telepon_tagihan TEXT,"+
                " kode_telepon_tagihan_tt TEXT,"+
                " kodehp TEXT,"+
                " kodehp_tt TEXT,"+
                " kodepos TEXT,"+
                " kodepos_kantor TEXT,"+
                " kodepos_kantor_tt TEXT,"+
                " kodepos_tagihan TEXT,"+
                " kodepos_tagihan_tt TEXT,"+
                " kodepos_tt TEXT,"+
                " kodetelepon_kantor TEXT,"+
                " pendidikan TEXT,"+
                " pendidikan_tt TEXT,"+
                " penghasilan TEXT,"+
                " penghasilan_tt TEXT,"+
                " suami TEXT,"+
                " suami_tt TEXT,"+
                " sumber TEXT,"+
                " sumber_dana TEXT,"+
                " sumber_dana_tt TEXT,"+
                " sumber_tt TEXT,"+
                " telepon TEXT,"+
                " telepon_kantor TEXT,"+
                " telepon_kantor_tt TEXT,"+
                " telepon_tagihan TEXT,"+
                " telepon_tagihan_tt TEXT,"+
                " telepon_tt TEXT,"+
                " ttl_anak1 TEXT,"+
                " ttl_anak1_tt TEXT,"+
                " ttl_anak2 TEXT,"+
                " ttl_anak2_tt TEXT,"+
                " ttl_anak3 TEXT,"+
                " ttl_anak3_tt TEXT,"+
                " ttl_suami TEXT,"+
                " ttl_suami_tt TEXT,"+
                " tujuan TEXT,"+
                " tujuan_tt TEXT,"+
                " status TEXT,"+
                " status_tt TEXT,"+
                " jenis_kelamin_tt TEXT,"+
                " jenis_kelamin TEXT,"+
                " curenttime TEXT" +
                " ttd TEXT" +
                ");");
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        // no-op, since will not be called until 2nd schema
        // version exists
    }

    public Cursor getAll() {
        return(getReadableDatabase()
                        .rawQuery("SELECT _id, agama,agamatt,alamat,alamat_tt,alamat_tagihan,alamat_tagihan_tt,alamatkantor,alamatkantor_tt,anak1," +
                                "anak1_tt,anak2,anak2_tt,anak3,anak3_tt,edit_bukti,edit_bukti_tt,edit_bulan,edit_bulan_tt,edit_ibu,edit_ibu_tt,edit_nama_pp," +
                                "edit_nama_tt,edit_nomor,edit_nomor_tt,edit_tahun,edit_tahun_tt,edit_tanggal,edit_tanggal_tt,edit_ttl,edit_ttl_tt," +
                                "edit_warga_negara,edit_warga_negara_tt,email_tt,email,hp,hp_tt,klasifikasi_industri," +
                                "klasifikasi_industri_tt,klasifikasi_pekerjaan,klasifikasi_pekerjaan_tt,kode_telepon,kode_telepon_tt,kode_telepon_kantor_tt," +
                                "kode_telepon_tagihan,kode_telepon_tagihan_tt,kodehp,kodehp_tt,kodepos,kodepos_kantor,kodepos_kantor_tt,kodepos_tagihan," +
                                "kodepos_tagihan_tt,kodepos_tt,kodetelepon_kantor,pendidikan,pendidikan_tt,penghasilan,penghasilan_tt," +
                                "suami,suami_tt,sumber,sumber_dana,sumber_dana_tt,sumber_tt,telepon,telepon_kantor,telepon_kantor_tt," +
                                "telepon_tagihan,telepon_tagihan_tt,telepon_tt,ttl_anak1,ttl_anak1_tt,ttl_anak2,ttl_anak2_tt,ttl_anak3,ttl_anak3_tt," +
                                "ttl_suami,ttl_suami_tt,tujuan,tujuan_tt,status,status_tt,jenis_kelamin_tt,jenis_kelamin,curenttime,ttd FROM table_spaj ORDER BY edit_nama_pp", null));
//                              "curenttime " +
    }

    public void insert(
            String agama,
            String agamatt,
            String alamat,
            String alamat_tt,
            String alamat_tagihan,
            String alamat_tagihan_tt,
            String alamatkantor,
            String alamatkantor_tt,
            String anak1,
            String anak1_tt,
            String anak2,
            String anak2_tt,
            String anak3,
            String anak3_tt,
            String edit_bukti,
            String edit_bukti_tt,
            String edit_bulan,
            String edit_bulan_tt,
            String edit_ibu,
            String edit_ibu_tt,
            String edit_nama_pp,
            String edit_nama_tt,
            String edit_nomor,
            String edit_nomor_tt,
            String edit_tahun,
            String edit_tahun_tt,
            String edit_tanggal,
            String edit_tanggal_tt,
            String edit_ttl,
            String edit_ttl_tt,
            String edit_warga_negara,
            String edit_warga_negara_tt,
            String email_tt,
            String email,
            String hp,
            String hp_tt,
            String klasifikasi_industri,
            String klasifikasi_industri_tt,
            String klasifikasi_pekerjaan,
            String klasifikasi_pekerjaan_tt,
            String kode_telepon,
            String kode_telepon_tt,
            String kode_telepon_kantor_tt,
            String kode_telepon_tagihan,
            String kode_telepon_tagihan_tt,
            String kodehp,
            String kodehp_tt,
            String kodepos,
            String kodepos_kantor,
            String kodepos_kantor_tt,
            String kodepos_tagihan,
            String kodepos_tagihan_tt,
            String kodepos_tt,
            String kodetelepon_kantor,
            String pendidikan,
            String pendidikan_tt,
            String penghasilan,
            String penghasilan_tt,
            String suami,
            String suami_tt,
            String sumber,
            String sumber_dana,
            String sumber_dana_tt,
            String sumber_tt,
            String telepon,
            String telepon_kantor,
            String telepon_kantor_tt,
            String telepon_tagihan,
            String telepon_tagihan_tt,
            String telepon_tt,
            String ttl_anak1,
            String ttl_anak1_tt,
            String ttl_anak2,
            String ttl_anak2_tt,
            String ttl_anak3,
            String ttl_anak3_tt,
            String ttl_suami,
            String ttl_suami_tt,
            String tujuan,
            String tujuan_tt,
            String status,
            String status_tt,
            String jenis_kelamin_tt,
            String jenis_kelamin,
            String curenttime,
            String ttd
            ) {
        ContentValues cv=new ContentValues();

        cv.put("agama", agama);
        cv.put("agamatt", agamatt);
        cv.put("alamat", alamat);
        cv.put("alamat_tt", alamat_tt);
        cv.put("alamat_tagihan", alamat_tagihan);
        cv.put("alamat_tagihan_tt", alamat_tagihan_tt);
        cv.put("alamatkantor", alamatkantor);
        cv.put("alamatkantor_tt", alamatkantor_tt);
        cv.put("anak1",anak1);
        cv.put("anak1_tt", anak1_tt);
        cv.put("anak2", anak2);
        cv.put("anak2_tt", anak2_tt);
        cv.put("anak3", anak3);
        cv.put("anak3_tt", anak3_tt);
        cv.put("edit_bukti", edit_bukti);
        cv.put("edit_bukti_tt", edit_bukti_tt);
        cv.put("edit_bulan", edit_bulan);
        cv.put("edit_bulan_tt", edit_bulan_tt);
        cv.put("edit_ibu", edit_ibu);
        cv.put("edit_ibu_tt", edit_ibu_tt);
        cv.put("edit_nama_pp", edit_nama_pp);
        cv.put("edit_nama_tt", edit_nama_tt);
        cv.put("edit_nomor", edit_nomor);
        cv.put("edit_nomor_tt", edit_nomor_tt);
        cv.put("edit_tahun", edit_tahun);
        cv.put("edit_tahun_tt", edit_tahun_tt);
        cv.put("edit_tanggal", edit_tanggal); 
        cv.put("edit_tanggal_tt", edit_tanggal_tt);
        cv.put("edit_ttl", edit_ttl);
        cv.put("edit_ttl_tt", edit_ttl_tt);
        cv.put("edit_warga_negara", edit_warga_negara);
        cv.put("edit_warga_negara_tt", edit_warga_negara_tt);
        cv.put("email_tt", email_tt);
        cv.put("email", email);
        cv.put("hp", hp);
        cv.put("hp_tt", hp_tt);
        cv.put("klasifikasi_industri", klasifikasi_industri);
        cv.put("klasifikasi_industri_tt", klasifikasi_industri_tt);
        cv.put("klasifikasi_pekerjaan", klasifikasi_pekerjaan);
        cv.put("klasifikasi_pekerjaan_tt", klasifikasi_pekerjaan_tt);
        cv.put("kode_telepon", kode_telepon);
        cv.put("kode_telepon_tt", kode_telepon_tt);
        cv.put("kode_telepon_kantor_tt", kode_telepon_kantor_tt);
        cv.put("kode_telepon_tagihan", kode_telepon_tagihan);
        cv.put("kode_telepon_tagihan_tt", kode_telepon_tagihan_tt);
        cv.put("kodehp", kodehp);
        cv.put("kodehp_tt", kodehp_tt);
        cv.put("kodepos", kodepos);
        cv.put("kodepos_kantor", kodepos_kantor);
        cv.put("kodepos_kantor_tt", kodepos_kantor_tt);
        cv.put("kodepos_tagihan", kodepos_tagihan);
        cv.put("kodepos_tagihan_tt", kodepos_tagihan_tt);
        cv.put("kodepos_tt", kodepos_tt);
        cv.put("kodetelepon_kantor", kodetelepon_kantor);
        cv.put("pendidikan", pendidikan);
        cv.put("pendidikan_tt", pendidikan_tt);
        cv.put("penghasilan", penghasilan);
        cv.put("penghasilan_tt", penghasilan_tt);
        cv.put("suami", suami);
        cv.put("suami_tt", suami_tt);
        cv.put("sumber", sumber);
        cv.put("sumber_dana", sumber_dana);
        cv.put("sumber_dana_tt", sumber_dana_tt);
        cv.put("sumber_tt", sumber_tt);
        cv.put("telepon", telepon);
        cv.put("telepon_kantor", telepon_kantor);
        cv.put("telepon_kantor_tt", telepon_kantor_tt);
        cv.put("telepon_tagihan", telepon_tagihan);
        cv.put("telepon_tagihan_tt", telepon_tagihan_tt);
        cv.put("telepon_tt", telepon_tt);
        cv.put("ttl_anak1",ttl_anak1 );
        cv.put("ttl_anak1_tt", ttl_anak1_tt);
        cv.put("ttl_anak2", ttl_anak2);
        cv.put("ttl_anak2_tt", ttl_anak2_tt);
        cv.put("ttl_anak3", ttl_anak3);
        cv.put("ttl_anak3_tt", ttl_anak3_tt);
        cv.put("ttl_suami", ttl_suami);
        cv.put("ttl_suami_tt", ttl_suami_tt);
        cv.put("tujuan", tujuan);
        cv.put("tujuan_tt", tujuan_tt);
        cv.put("status", status);
        cv.put("status_tt", status_tt);
        cv.put("jenis_kelamin_tt", jenis_kelamin_tt);
        cv.put("jenis_kelamin", jenis_kelamin);
        cv.put("curenttime", GetTime.getCurrentDate("yyyyMMddhhmmss"));
        cv.put("ttd", ttd);

        getWritableDatabase().insert("table_spaj", "name", cv);
    }

    public String getagama(Cursor c) {
        return(c.getString(1));
    }

    public String getagamatt(Cursor c) {
        return(c.getString(2));
    }

    public String getalamat(Cursor c) {
        return(c.getString(3));
    }

public String getalamat_tt(Cursor c) {
        return(c.getString(4));
    }

public String getalamat_tagihan(Cursor c) {
        return(c.getString(5));
    }

public String getalamat_tagihan_tt(Cursor c) {
        return(c.getString(6));
    }

public String getalamatkantor(Cursor c) {
        return(c.getString(7));
    }

public String getalamatkantor_tt(Cursor c) {
        return(c.getString(8));
    }

public String getanak1(Cursor c) {
        return(c.getString(9));
    }
    public String getanak1_tt(Cursor c) {
        return(c.getString(10));
    }

public String getanak2(Cursor c) {
        return(c.getString(11));
    }

public String getanak2_tt(Cursor c) {
        return(c.getString(12));
    }

public String getanak3(Cursor c) {
        return(c.getString(13));
    }

public String getanak3_tt(Cursor c) {
        return(c.getString(14));
    }

public String getedit_bukti(Cursor c) {
        return(c.getString(15));
    }

public String getedit_bukti_tt(Cursor c) {
        return(c.getString(16));
    }

public String getedit_bulan(Cursor c) {
        return(c.getString(17));
    }

public String getedit_bulan_tt(Cursor c) {
        return(c.getString(18));
    }

public String getedit_ibu(Cursor c) {
        return(c.getString(19));
    }

public String getedit_ibu_tt(Cursor c) {
        return(c.getString(20));
    }

public String getedit_nama_pp(Cursor c) {
        return(c.getString(21));
    }

public String getedit_nama_tt(Cursor c) {
        return(c.getString(22));
    }

public String getedit_nomor(Cursor c) {
        return(c.getString(23));
    }

public String getedit_nomor_tt(Cursor c) {
        return(c.getString(24));
    }

public String getedit_tahun(Cursor c) {
        return(c.getString(25));
    }

public String getedit_tahun_tt(Cursor c) {
        return(c.getString(26));
    }

public String getedit_tanggal(Cursor c) {
        return(c.getString(27));
    }

public String getedit_tanggal_tt(Cursor c) {
        return(c.getString(28));
    }

public String getedit_ttl(Cursor c) {
        return(c.getString(29));
    }

public String getedit_ttl_tt(Cursor c) {
        return(c.getString(30));
    }

public String getedit_warga_negara(Cursor c) {
        return(c.getString(31));
    }

public String getedit_warga_negara_tt(Cursor c) {
        return(c.getString(32));
    }

public String getemail_tt(Cursor c) {
        return(c.getString(33));
    }

public String getemail(Cursor c) {
        return(c.getString(34));
    }

public String gethp(Cursor c) {
        return(c.getString(35));
    }

public String gethp_tt(Cursor c) {
        return(c.getString(36));
    }

public String getklasifikasi_industri(Cursor c) {
        return(c.getString(37));
    }

public String getklasifikasi_industri_tt(Cursor c) {
        return(c.getString(38));
    }

public String getklasifikasi_pekerjaan(Cursor c) {
        return(c.getString(39));
    }

public String getklasifikasi_pekerjaan_tt(Cursor c) {
        return(c.getString(40));
    }

public String getkode_telepon(Cursor c) {
        return(c.getString(41));
    }

public String getkode_telepon_tt(Cursor c) {
        return(c.getString(42));
    }

public String getkode_telepon_kantor_tt(Cursor c) {
        return(c.getString(43));
    }

public String getkode_telepon_tagihan(Cursor c) {
        return(c.getString(44));
    }

public String getkode_telepon_tagihan_tt(Cursor c) {
        return(c.getString(45));
    }

public String getkodehp(Cursor c) {
        return(c.getString(46));
    }

public String getkodehp_tt(Cursor c) {
        return(c.getString(47));
    }

public String getkodepos(Cursor c) {
        return(c.getString(48));
    }

public String getkodepos_kantor(Cursor c) {
        return(c.getString(49));
    }

public String getkodepos_kantor_tt(Cursor c) {
        return(c.getString(50));
    }

public String getkodepos_tagihan(Cursor c) {
        return(c.getString(51));
    }

public String getkodepos_tagihan_tt(Cursor c) {
        return(c.getString(52));
    }

public String getkodepos_tt(Cursor c) {
        return(c.getString(53));
    }

public String getkodetelepon_kantor(Cursor c) {
        return(c.getString(54));
    }

public String getpendidikan(Cursor c) {
        return(c.getString(55));
    }

public String getpendidikan_tt(Cursor c) {
        return(c.getString(56));
    }

public String getpenghasilan(Cursor c) {
        return(c.getString(57));
    }

public String getpenghasilan_tt(Cursor c) {
        return(c.getString(58));
    }

public String getsuami(Cursor c) {
        return(c.getString(59));
    }

public String getsuami_tt(Cursor c) {
        return(c.getString(60));
    }

public String getsumber(Cursor c) {
        return(c.getString(61));
    }

public String getsumber_dana(Cursor c) {
        return(c.getString(62));
    }

public String getsumber_dana_tt(Cursor c) {
        return(c.getString(63));
    }

public String getsumber_tt(Cursor c) {
        return(c.getString(64));
    }

public String gettelepon(Cursor c) {
        return(c.getString(65));
    }

public String gettelepon_kantor(Cursor c) {
        return(c.getString(66));
    }

public String gettelepon_kantor_tt(Cursor c) {
        return(c.getString(67));
    }

public String gettelepon_tagihan(Cursor c) {
        return(c.getString(68));
    }

public String gettelepon_tagihan_tt(Cursor c) {
        return(c.getString(69));
    }

public String gettelepon_tt(Cursor c) {
        return(c.getString(70));
    }

public String getttl_anak1(Cursor c) {
        return(c.getString(71));
    }

public String getttl_anak1_tt(Cursor c) {
        return(c.getString(72));
    }

public String getttl_anak2(Cursor c) {
        return(c.getString(73));
    }

public String getttl_anak2_tt(Cursor c) {
        return(c.getString(74));
    }

public String getttl_anak3(Cursor c) {
        return(c.getString(75));
    }

public String getttl_anak3_tt(Cursor c) {
        return(c.getString(76));
    }

public String getttl_suami(Cursor c) {
        return(c.getString(77));
    }

public String getttl_suami_tt(Cursor c) {
        return(c.getString(78));
    }

public String gettujuan(Cursor c) {
        return(c.getString(79));
    }

public String gettujuan_tt(Cursor c) {
        return(c.getString(80));
    }

public String getstatus(Cursor c) {
    return(c.getString(81));
}

public String getstatus_tt(Cursor c) {
    return(c.getString(82));
}

public String getjenis_kelamin(Cursor c) {
    return(c.getString(83));
}

public String getjenis_kelamin_tt(Cursor c) {
    return(c.getString(84));
}

public String getcurenttime(Cursor c) {
    return(c.getString(85));
}

public String getttd(Cursor c) {
    return(c.getString(86));
}

is there something wrong with my code? this is my logcat say :

我的代码有问题吗?这是我的日志猫说:

09-27 14:56:41.858: E/AndroidRuntime(9133): FATAL EXCEPTION: main
09-27 14:56:41.858: E/AndroidRuntime(9133): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.example.touch/org.example.touch.FormSpaj}: android.database.sqlite.SQLiteException: no such column: ttd (code 1): , while compiling: SELECT _id, agama,agamatt,alamat,alamat_tt,alamat_tagihan,alamat_tagihan_tt,alamatkantor,alamatkantor_tt,anak1,anak1_tt,anak2,anak2_tt,anak3,anak3_tt,edit_bukti,edit_bukti_tt,edit_bulan,edit_bulan_tt,edit_ibu,edit_ibu_tt,edit_nama_pp,edit_nama_tt,edit_nomor,edit_nomor_tt,edit_tahun,edit_tahun_tt,edit_tanggal,edit_tanggal_tt,edit_ttl,edit_ttl_tt,edit_warga_negara,edit_warga_negara_tt,email_tt,email,hp,hp_tt,klasifikasi_industri,klasifikasi_industri_tt,klasifikasi_pekerjaan,klasifikasi_pekerjaan_tt,kode_telepon,kode_telepon_tt,kode_telepon_kantor_tt,kode_telepon_tagihan,kode_telepon_tagihan_tt,kodehp,kodehp_tt,kodepos,kodepos_kantor,kodepos_kantor_tt,kodepos_tagihan,kodepos_tagihan_tt,kodepos_tt,kodetelepon_kantor,pendidikan,pendidikan_tt,penghasilan,penghasilan_tt,suami,suami_tt,sumber,sumber_dana,sumber_dana_tt,sumber_tt,telepon,telepon_kantor,telepon_kantor_tt,telepon_tagihan,telepon_tagihan_tt,telepon_tt,ttl_anak1,ttl_anak1_tt,ttl_anak2,ttl_anak2_tt,ttl_anak3,ttl_anak3_tt,ttl_suami,ttl_suami_tt,tujuan,tujuan_tt,status,status_tt,jenis_kelamin_tt,jenis_kelamin,curenttime,ttd FROM table_spaj ORDER BY edit_nama_pp
09-27 14:56:41.858: E/AndroidRuntime(9133):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2122)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at android.app.ActivityThread.access$600(ActivityThread.java:140)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1228)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at android.os.Handler.dispatchMessage(Handler.java:99)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at android.os.Looper.loop(Looper.java:137)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at android.app.ActivityThread.main(ActivityThread.java:4895)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at java.lang.reflect.Method.invokeNative(Native Method)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at java.lang.reflect.Method.invoke(Method.java:511)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at dalvik.system.NativeStart.main(Native Method)
09-27 14:56:41.858: E/AndroidRuntime(9133): Caused by: android.database.sqlite.SQLiteException: no such column: ttd (code 1): , while compiling: SELECT _id, agama,agamatt,alamat,alamat_tt,alamat_tagihan,alamat_tagihan_tt,alamatkantor,alamatkantor_tt,anak1,anak1_tt,anak2,anak2_tt,anak3,anak3_tt,edit_bukti,edit_bukti_tt,edit_bulan,edit_bulan_tt,edit_ibu,edit_ibu_tt,edit_nama_pp,edit_nama_tt,edit_nomor,edit_nomor_tt,edit_tahun,edit_tahun_tt,edit_tanggal,edit_tanggal_tt,edit_ttl,edit_ttl_tt,edit_warga_negara,edit_warga_negara_tt,email_tt,email,hp,hp_tt,klasifikasi_industri,klasifikasi_industri_tt,klasifikasi_pekerjaan,klasifikasi_pekerjaan_tt,kode_telepon,kode_telepon_tt,kode_telepon_kantor_tt,kode_telepon_tagihan,kode_telepon_tagihan_tt,kodehp,kodehp_tt,kodepos,kodepos_kantor,kodepos_kantor_tt,kodepos_tagihan,kodepos_tagihan_tt,kodepos_tt,kodetelepon_kantor,pendidikan,pendidikan_tt,penghasilan,penghasilan_tt,suami,suami_tt,sumber,sumber_dana,sumber_dana_tt,sumber_tt,telepon,telepon_kantor,telepon_kantor_tt,telepon_tagihan,telepon_tagihan_tt,telepon_tt,ttl_anak1,ttl_anak1_tt,ttl_anak2,ttl_anak2_tt,ttl_anak3,ttl_anak3_tt,ttl_suami,ttl_suami_tt,tujuan,tujuan_tt,status,status_tt,jenis_kelamin_tt,jenis_kelamin,curenttime,ttd FROM table_spaj ORDER BY edit_nama_pp
09-27 14:56:41.858: E/AndroidRuntime(9133):     at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1012)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:623)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1314)
09-27 14:56:41.858: E/AndroidRuntime(9133):     at android.database.sqlite.SQLiteDatabase.rawQ

i hope someone can help me to solve my problem, thank you.

我希望有人能帮我解决我的问题,谢谢。

1 个解决方案

#1


2  

You are missing a coma here

你没有昏迷

           " jenis_kelamin TEXT,"+
            " curenttime TEXT" + // missing coma here
            " ttd TEXT" +

Should be

应该是

           " jenis_kelamin TEXT,"+
            " curenttime TEXT," +
            " ttd TEXT" +

#1


2  

You are missing a coma here

你没有昏迷

           " jenis_kelamin TEXT,"+
            " curenttime TEXT" + // missing coma here
            " ttd TEXT" +

Should be

应该是

           " jenis_kelamin TEXT,"+
            " curenttime TEXT," +
            " ttd TEXT" +