I'm doing a database on a survey, and this is a multiple choice, but if I want to store the multiple choice answers, if the course is a INTEGER , the name is TEXT , what can the RadioButton
be? Thanks.
I add this for someone to help me:
Hello, here I have an error in this line:
bdEncuesta usdbh =
new bdEncuesta(this, "DBEncuestado", null, 1);
SQLiteDatabase db = usdbh.getWritableDatabase();
Where it says: (this, "DBEncuestado", null, 1);
I have an error. It says: bdEncuesta() in bdEncuesta cannot be applied to.
This is what I have in bdEncuesta.java
public class bdEncuesta extends SQLiteOpenHelper {
String sqlCreate = "CREATE TABLE Encuestado (nombre TEXT, curso INTEGER, PREG2 text, preg3, TEXT, preg4 TEXT, preg5 TEXT)";
public bdEncuesta(Context contexto, String nombre, CursorFactory factory, int version) {
super(contexto, nombre, factory, version);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(sqlCreate);
}
@Override
public void onUpgrade(SQLiteDatabase db, int versionAnt, int versionNva) {
db.execSQL("DROP TABLE IF EXISTS Encuestado");
db.execSQL(sqlCreate);
}
}