dbhandler 类
public class DBHandler extends SQLiteOpenHelper{
private static final int DATABASE_VERSION = 1;
private static final String DATABASE_NAME = "feedbackDB.db";
private static final String TABLE_FEEDBACK = "feedback";
private static final String DB_PATH = "/data/data/com.example.vbfeed/databases/";
public DBHandler(Context context, String name,CursorFactory factory, int version) {
super(context,context.getExternalFilesDir(null).getAbsolutePath() + DB_PATH + DATABASE_NAME, factory, DATABASE_VERSION);
}
Click上的主要活动代码onCreate
和按钮
DBHandler dbHandler = new DBHandler(getBaseContext(),name,null, 1);
//having error in this line--just constructor defining error,
//i dono the variables to declare