Note that there are some explanatory texts on larger screens.

plurals
  1. POError calling activity
    primarykey
    data
    text
    <p>Nothing shows at LogCat, so i have no ideia of the error, hero goes the entire code:</p> <pre><code>package com.ibssistemas.pda; import android.app.Activity; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.widget.ListView; import android.widget.SimpleCursorAdapter; import android.widget.Toast; import com.ibssistemas.pda.database.dbHelper; public class BuscaCliente extends Activity { ListView lista; public void AtualizaLista(String nome) { dbHelper DB = new dbHelper(BuscaCliente.this); SQLiteDatabase dB = DB.getReadableDatabase(); if (nome == null) { Cursor c = dB.query("Cliente", (new String[]{"cdCliente", "nmCliente", "cdCPFCNPJ"}), null, null, null, null, "cdCliente"); if (c.getCount()==0) { Toast.makeText(BuscaCliente.this, "Nenhum cliente encontrado!", 10).show(); return; } c.moveToFirst(); String[] from = {"cdCliente", "nmCliente", "cdCPFCNPJ"}; int[] to = {R.id.cdCliente,R.id.nmCliente, R.id.CPFCliente}; SimpleCursorAdapter adapter = new SimpleCursorAdapter(BuscaCliente.this, R.layout.layoutbuscacliente, c, from, to); lista.setAdapter(adapter); dB.close(); return; } nome = nome.toUpperCase(); Cursor c = dB.query("Cliente", (new String[]{"cdCliente", "nmCliente", "cdCPFCNPJ"}), "nmCliente LIKE \"%"+nome+"%\"", null, null, null, "cdCliente"); if (c.getCount()==0) { Toast.makeText(BuscaCliente.this, "Nenhum cliente encontrado!", 10).show(); return; } c.moveToFirst(); String[] from = {"cdCliente", "nmCliente", "cdCPFCNPJ"}; int[] to = {R.id.cdCliente,R.id.nmCliente, R.id.CPFCliente}; SimpleCursorAdapter adapter = new SimpleCursorAdapter(BuscaCliente.this, R.layout.layoutbuscacliente, c, from, to); lista.setAdapter(adapter); dB.close(); return; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.buscacliente); lista = (ListView)findViewById(R.id.listaBuscaCliente); AtualizaLista(null); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload