Java tutorial
//package com.java2s; import android.database.Cursor; public class Main { public static String gText(Cursor cursor, String columeName) { String val = null; if (cursor.getColumnIndex(columeName) != -1) { val = cursor.getString(cursor.getColumnIndex(columeName)); } return val; } }