mercredi 30 mars 2016

Android sqlite db.execSQL() forceclose

This is db class onCreate Method above this method i defined constructor with proper arguments, but runtime log for below method shows that it executed till run1.2 not furthur statement so please help me on this..

public void onCreate(SQLiteDatabase db) {
        try{
         db = getWritableDatabase();
        db.beginTransaction();
        android.util.Log.w("check", "run1.1");
        String query = " CREATE TABLE check ( id INTEGER )";
        android.util.Log.w("check", "run1.2");
        db.execSQL(query, null);
        android.util.Log.w("check", "run1.3");
        }
        catch(Exception e){
            android.util.Log.w("check", e.toString());
        }

    }

Aucun commentaire:

Enregistrer un commentaire