We can't be explicit, because we have no idea how your system works, but this is the general idea:
using (SqlConnection con = new SqlConnection(strConnect))
{
con.Open();
using (SqlCommand cmd = new SqlCommand("SELECT iD, description FROM myTable WHERE Name LIKE '%' + @NM + '%'", con))
{
cmd.Parameters.AddWithValue("@NM", myNameTextBox.Text);
using (SqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
int id = (int) reader["iD"];
string desc = (string) reader["description"];
Console.WriteLine("ID: {0}\n {1}", iD, desc);
}
}
}
}
Clearly, you will need to modify the WHERE clause to fit your circumstances at the minimum.