Q:

getting runtime exception when using cursor in this code

my onitemclick part of code is .....
i have three column id title and notetext in which i just want to display text from my sqlite database column (notetext) when i click title from listview.  
lv.setOnItemClickListener(new OnItemClickListener()
{

 public void onItemClick(AdapterView<? > arg0, View arg1, int arg2,long arg3)
    {
Cursor cursor = (Cursor)arg0.getItemAtPosition(arg2); // i m getting error here

String product = cursor.getString(cursor.getColumnIndex("notetext"));

Intent myintent = new Intent(getApplicationContext(),view1.class);

myintent.putExtra("product", product);

startActivity(myintent);

   }
});

A:

try this code
  cursor.moveToPosition(position);
  String product = cursor.getString(cursor.getColumnIndex("notetext"));

