Android Cursor Index out of Bound Exception

gibt es eine Sache falsch mit diesem code, ich möchte zur Abfrage der Daten durch die Verwendung von barcode und es mir zeigen, dass Cursor Index out of Bound exception .

public String getIdByBarcode(String ss) throws SQLException{
    String[] column = new String[]{Pro_ID,Pro_Barcode, Pro_Name,Pro_NameKhmer, Pro_Quantity, Pro_Price, Pro_Description, Pro_Date};
    Cursor c = ourDatabase.query(TABLE_NAME, column, Pro_Barcode + "= '" + ss + "' " , null, null, null, null);

    if(c != null){
        c.moveToFirst();
        String id = c.getString(0);
        Log.v(id, id + "Id" );
        return id;
    }
    return null;
}

InformationsquelleAutor user2149618 | 2013-07-13

Schreibe einen Kommentar