public String getAllData() { SQLiteDatabase db = helper.getWritableDatabase(); String[] columns = {helper.COLUMN_ID, helper.COLUMN_NAME}; Cursor cursor = db.query(helper.TABLE_ACCOUNTHEADS, columns, null, null, null, null, null); StringBuffer buffer = new StringBuffer(); while(cursor.moveToNext()) { int cid = cursor.getInt(0); String accountname = cursor.getString(1); buffer.append(cid + " " + accountname + "\n"); } return buffer.toString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)