Code example for SQLException

Methods: printStackTrace, toString

0
            // ask the database object to create the cursor. 
            cursor = db.query(CHAR_TABLE, new String[]{CHAR_TABLE_NAME, CHAR_TABLE_EVEID, CHAR_TABLE_CORPNAME, CHAR_TABLE_CORPID, CHAR_TABLE_KEYID, CHAR_TABLE_VCODE, CHAR_TABLE_QUEUETIME},
                    null, null, null, null, null); 
 
        } catch (SQLException e) {
            Log.e("DB Error", e.toString());
            e.printStackTrace();
        } 
 
        // return the ArrayList that holds the data collected from 
        // the database. 
        return cursor;
    } 
 
    public Cursor getEnabledCharacters() {
        // this is a database call that creates a "cursor" object. 
        // the cursor object store the information collected from the 
        // database and is used to iterate through the data. 
        Cursor cursor = null;
 
        try {