안녕하세요.

항상 도움만 받고 있어요, 감사해요 ㅜ.ㅜ


리스뷰를 만들어서 체크박스를 클릭하면 데이터베이스로 저장하는 것을 만들고 있는데요 


 public class StudentAdapter extends ArrayAdapter<Student1> { 


StudentAdapter클레스는 Student1클레스에서 파싱해온 데이터를 얻어가지고 와 리스트를 만들고 있습니다. 


문제는 

 DBHandler dbhandler = DBHandler.open(this);

이걸 써서 클릭한 리스트의 내용을 저장하고 싶은데요

extends를 Activity로 한 클레스에서는 오류가 나지 않지만

이 클레스는 Activity로 extends를 해주지 않아서인지

DBHandler dbhandler = DBHandler.open(this);  ---- >open에서 에러가 나네요.


여기에 마우스포인터를 갖다대면 DBHandler에 있는 내용을 고치라고 하는데

그 방법을 따라해도 계속 에러가 생기네요.


어떻게 해야할까요?


바꾸라고 뜨는 DBHandler의 내용입이다.


 private DBHandler(Context cx) {
        this.helper = new DBHelper(cx);
        this.db = helper.getWritableDatabase();
    }
    public static DBHandler open(Context cx) throws SQLException {
        DBHandler handler = new DBHandler(cx);        
        return handler;    
    }



도와주세요 ~ ^^