지금 메모장 수정단계를 하고 있는데요..
getColumnIndex 요 부분이 자꾸 에러가 뜨네요.
다른 샘플코드에 사용 될때는 아무 이상이 없던데...
위에 주석 처리 한 부분은 로그캣에 뜨는 에런데.. 아무리 봐도 해석도 못하고 뜻도 몰라서..
고수분들께 도움을 요청드립니다 ㅠㅠ
** 현재 데이터 베이스 저장은 _id값과 content 값만 저장하고있습니다 ;ㅅ; **
case MENU_EDIT:
LayoutInflater li = getLayoutInflater();
final View v = li.inflate(R.layout.ex_edit, null);
final EditText name = (EditText)v.findViewById(R.id.ex_editex);
c = dbmemo.getMemo(info.id);
//08-01 11:56:34.001: ERROR/AndroidRuntime(2263): android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 0
String nameStr = c.getString(c.getColumnIndex("content"));
name.setText(nameStr);
new AlertDialog.Builder(this)
.setTitle(R.string.str_Edit)
.setView(v)
.setPositiveButton(R.string.str_Edit, new DialogInterface.OnClickListener(){
@Override
public void onClick(DialogInterface dialog, int which) {
dbmemo.updateMemo(info.id, name.getText().toString());
c.requery();
}
})
.setNegativeButton(R.string.str_Cancel, new DialogInterface.OnClickListener(){
@Override
public void onClick(DialogInterface dialog, int which) {
// Do Nothing
}
}).show();
return true;




c 가 커서죠? 어떻게 처리 되어있는지는 모르겠지만
c.getCount() 한뒤에 0보다 큰게 확실하다면
c.moveToFirst() 한뒤에 가져와 보세요