Code example for SQLException

Methods: printStackTrace

0
        public void onCreate(SQLiteDatabase db)
        { 
            try { 
                db.execSQL(DATABASE_CREATE);
            } catch (SQLException e) {
                e.printStackTrace();
            } 
        } 
        @Override 
        public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
        { 
            Log.w(TAG, "Upgrading database from version" + oldVersion + " to "
                    + newVersion + ", which will destroy all old data");
            db.execSQL("DROP TABLE IF EXISTS contacts");
 
     onCreate(db);
        } 
    } 
    //---opens the database--- 
    public DBAdapter open() throws SQLException 
    {