Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void recuperaNumeroRecord() {
- // Chiediamo l'accesso al db
- SQLiteDatabase db = DatabaseHelper.getReadableDatabase();
- // Query per recuperare il numero di righe presenti nel db
- final String sql = "SELECT COUNT(*) FROM assist_rubrica";
- Cursor c = db.rawQuery(sql, null);
- if (c.moveToFirst()) {
- final TextView tView = (TextView) this
- .findViewById(R.id.mainTextViewNumeroRecord);
- tView.setText(c.getString(0));
- System.out.println("Numero record recuperato!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement