ListView av = getListView(); 
        av.setAdapter(adapter);
        
        av.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            public void onItemClick(
                AdapterView<?> parent, View view, int position, long id) {
             // Check for delete button
             final long deletePetId =  id;
             
             // Use an Alert dialog to confirm delete operation
    new AlertDialog.Builder(List.this)
    .setTitle("DB자료 삭제")
    .setMessage("선택하신 자료를 삭제하시겠습니까?")
    .setPositiveButton("삭제", new DialogInterface.OnClickListener() {
     public void onClick(DialogInterface dialog, int which) {
      mDbHelper.deleteRow(deletePetId); 
                 }
          })
          .setNegativeButton("취소", new DialogInterface.OnClickListener() {
     public void onClick(DialogInterface dialog, int which) {
                  // Refresh the data in our cursor and therefore our List
                 }
          })
          .show();
            }
        });




위의 소스를 보면
리스트에 뿌려주는것은 제대로 나오는데, 그 리스트 항목을 클릭하면
다이얼로그를 보여주어, 삭제 및 취소 버튼을 클릭 시 각 해당 메소드를 실행하게 하고 싶습니다.

뭐가 잘못된것인지 삭제가 되지를 않고 오류메세지가 출력됩니다. ㅠㅠ

고수분들 조언좀 ㅠㅠ