Guest User

Untitled

a guest
Nov 24th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. String lista = "Lista de Compras nn";
  2. for (int i = 0; i <= cursor.getColumnCount(); i++){
  3. lista.concat(cursor.getString(i)+ "n");
  4. }
  5.  
  6. public Cursor buscaListaProdutos(){
  7. SQLiteDatabase banco = getWritableDatabase();
  8. Cursor c = banco.rawQuery("SELECT _id, nomeProduto, qtdeProduto FROM listaProduto", null);
  9.  
  10. if(c.moveToFirst()){
  11. banco.close();
  12. return c;
  13. }else{
  14. banco.close();
  15. return null;
  16. }
  17. }
Add Comment
Please, Sign In to add comment