There are countless ways to achieve this goal. I will suggest an approach that I consider to be efficient.
The ideal would be to implement your own version of ** SimpleCursorAdapter **, register a callback responsible for performing the desired action and pass back to this callback some data pertaining to your record, preferably an ID.
In your callback you perform the operation using the reference you received, in case you open a new activity. Get the reference in activity and make a new reference to DB with the reference.
1 - Tutorial to implement SimpleCursorAdapter
2 - Implement an interface on your adapter to pass info to your callback
public interface MyListener {
void setOnClickAdapter(final View view, final int myId );
}
3 - Register your listener on the bindView method of your adapter
@Override
public void bindView(final View view, final Context context, final Cursor cursor) {
//....
MyListener listener = (TaskListener)context;
listener.setOnClickAdapter( myTextView, id );
4 - In your activity used as context implement the adapter interface
@Override
public void setOnClickAdapter( final View view, final int id)
{
view.setOnClickListener( new View.OnClickListener )
@Override
public void onClick(View view) {
// Execute sua operação
}
}