Code example for SQLException

Methods: e, getMessage

0
            long success = db.replace(TABLE, null, values);
 
            Log.i(LOG_TAG, "transaction successfull: " + success);
            db.setTransactionSuccessful();
        } catch (SQLException e) {
            Log.e(LOG_TAG, e.getMessage(), e);
        } finally { 
            db.endTransaction();
        } 
 
        if (writecount++ % 100 == 0) {
            SQLiteDatabase.releaseMemory();
        } 
	} 
 
    public String getLastRowAsString() {
        SQLiteDatabase db = getReadableDatabase();
        Cursor cursor = db.rawQuery("SELECT * FROM " + TABLE + " ORDER BY time DESC LIMIT 1", null);
 
        StringBuilder sb = new StringBuilder(64);
        if (cursor.moveToFirst()) {