--
@Override
public void onCreate(final SQLiteDatabase db) {
StringBuilder create = new StringBuilder(" ");
create.append(" CREATE TABLE ");
create.append(Aluno.class.getSimpleName());
create.append(" ( id INTEGER PRIMARY KEY AUTOINCREMENT,");
create.append(" nome VARCHAR(30),");
create.append(" matricula VARCHAR(30),");
create.append(" sobrenome VARCHAR(30),");
create.append(" email VARCHAR(30),");
create.append(" phone VARCHAR(30),");
create.append(" responsavel VARCHAR(30)");
create.append(" , photo BLOB");
create.append(" );");
db.execSQL(create.toString());
create = new StringBuilder(" ");
create.append(" CREATE TABLE ");
create.append(Professor.class.getSimpleName());
create.append(" ( id INTEGER PRIMARY KEY AUTOINCREMENT, nome VARCHAR(30),");
create.append(" mail VARCHAR(30),");
create.append(" login VARCHAR(10),");
create.append(" senha VARCHAR(10),");
create.append(" retorno VARCHAR(3),");
create.append(" faltas VARCHAR(3)");
create.append(" ); ");
db.execSQL(create.toString());
}
--
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-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Então Alex.... Ouvi uma lenda urbana q concatenar strings com + consome mais memória....
You received this message because you are subscribed to a topic in the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/androidbrasil-dev/sz3YPNjj7is/unsubscribe.
To unsubscribe from this group and all its topics, send an email to androidbrasil-...@googlegroups.com.
A concatenação de strings nesse caso ocorre em tempo de compilação, já que é constante.Ajuda se você fizer final String sql = "..." + "…" + "…" pra reforçar esse comportamento.
--
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-...@googlegroups.com.