안드로이드 개발 질문/답변
(글 수 45,052)
고수님들께서 보시면 부끄러울 질문같네요;;
zDBopenhelp = new ZipcodeDB(this);
db = zDBopenhelp.getWritableDatabase();
try {
Cursor cs = db.rawQuery(SIDOQuery, null);
Log.i("testLog", "데이터겟수: "+cs.getCount());
//areaList01에 커서 데이터 담기
for (int i=0; i < cs.getCount(); i++){
cs.moveToNext();
areaList01[i] = cs.getString(i);
}
cs.close();
} catch(Exception ex) {
Log.e("areaList01", "Exception in query_SQL", ex);
}
zDBopenhelp.close();
이런식으로 코딩해서 for구문으로 areaList01[]에 커서데이터를 넣으려고 했습니다.
실행해보면 자꾸 nullpointException에러가 나서 왜 그런가 고민중이네요;
어디가 잘 못 된걸까요? ㅠㅠ



