db 에 저장된 목록을 listactivity 를 통해 list 형식으로 보여 준뒤

 

해당 list 를 클릭을 하면 db 에 저장된 데이터 내용을 띄어 주도록 구현을 하였습니다

그런데 cursorindexoutofboundsexception index 0 requested with a size of 0 이 에러가 나는 원인이 무엇인지 알려주시면 감사하겠습니다

protected void onListItemClick(android.widget.ListView l, View v,
int position, long id) {
// TODO Auto-generated method stub
DBHandler dbhandler=DBHandler.open(this);
super.onListItemClick(l, v, position, id);
Cursor cursor=dbhandler.select(position);
if(cursor!=null) {cursor.moveToFirst();}
startManagingCursor(cursor);

String name=cursor.getString(cursor.getColumnIndex("car_name"));
Toast.makeText(this, name,Toast.LENGTH_LONG).show();

이런식으로 구현을 햇는데

cursorindexoutofboundsexception index 0 requested with a size of 0

이 에러가 나는 원인이 무엇인지 알수 있을까요?