Blz, vou testar
Em 22/06/2013 20:52, "Henrique Melo" <henrique1985@gmail.com> escreveu:
-- sempre será lancada uma exception.Você pode captura-la dentro de um try....catch.--Em 21 de junho de 2013 20:03, Rodrigo Alves da S. Cardoso <r.cardoso1984@gmail.com> escreveu:
Como posso testar o erro SQL retornado?--Um exemplo besta "INSERT INTO TABELA (CAMPO1) VALU ES (VALOR1)"
Atualmente uso assim como abaixo, o exemplo acima é só p dar um exemplo p entenderem o q eu quero...public void insere(Aluno aluno) {ContentValues values = toContentValues(aluno);long id = getWritableDatabase().insert(TABELA, null, values);aluno.setId(id);}Queria saber como testar algum erro... Tipo se em algum campo da classe aluno tiver um plique, n sei como o mysql se comporta com isso...Ou qndo desse duplicate key tratar de outra forma o registro por exemplo...
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--Henrique Nogueira de Melo
Analista e Arquiteto de Software
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.






0 comentários:
Postar um comentário