Q:

How can i set a CommandText to my Search Button?

I'm trying to make a search button that when i enter an ID to a Textbox and press it , it goes to my private SQL server database and get the data row referred to that ID , But The exception handler brings me error because of my wrong CommandText .. Here is my Code 
private void SearchBtn_Click(object sender, EventArgs e)
{
   cn.ConnectionString = Properties.Settings.Default.ConStr;
   if (ID.Text == "")
   {
      MessageBox.Show("Please Enter The ID you would like to search");
   }
   else
   {
      SqlCommand com = new SqlCommand();
      cn.Open();
      SqlParameter user = new SqlParameter("@ID", SqlDbType.Int);
      SqlParameter FN = new SqlParameter("@First_Name",SqlDbType.NChar);
      SqlParameter LN = new SqlParameter("@Last_Name", SqlDbType.VarChar);
      SqlParameter Jb = new SqlParameter("@Job", SqlDbType.VarChar);
      SqlParameter Ag = new SqlParameter("@Age", SqlDbType.VarChar);
      SqlParameter ph = new SqlParameter("@Phone", SqlDbType.VarChar);
      com.Parameters.Add(user);
      com.Parameters.Add(FN);
      com.Parameters.Add(LN);
      com.Parameters.Add(Jb);
      com.Parameters.Add(Ag);
      com.Parameters.Add(ph);

      com.Connection = cn;

Here is my Error : 
                *com.CommandText = "Search (First_Name,Last_Name,Job,Age,Phone) values('" + FN + "','" + LN + "','" + Jb+ "','" + Ag + "','" + ph + "' from MyList) ";*
      user.Direction = ParameterDirection.Input;
      FN.Direction = ParameterDirection.Output;
      LN.Direction = ParameterDirection.Output;
      Jb.Direction = ParameterDirection.Output;
      Ag.Direction = ParameterDirection.Output;
      ph.Direction = ParameterDirection.Output;

      FN.Size = 10;
      LN.Size = 10;
      Jb.Size = 10;
      Ag.Size = 10;
      ph.Size = 10;

      user.Value = Convert.ToInt32(ID.Text);

      try
      {
         com.ExecuteNonQuery();

         FirstName.Text = FN.Value.ToString();
         LastName.Text = LN.Value.ToString();
         Job.Text = Jb.Value.ToString();
         Age.Text = Ag.Value.ToString();
         Phone.Text = ph.Value.ToString();
      }
      catch (Exception ex)
      {
         MessageBox.Show(ex.Message);
      }
      finally
      {
         cn.Close();
      }

I'm Using Visual Studio 2012 .
Thanks in Advance .

A:

"Search (First_Name,Last_Name,Job,Age,Phone) values('" + FN + "','" + LN + "','" + Jb+ "','" + Ag + "','" + ph + "' from MyList)"

doesn't really look like SQL. Also I'm not quite sure why you're setting loads of parameters you're not using.
Maybe you meant something like
com.CommandText = "SELECT First_Name, Last_Name, Job, Age, Phone FROM MyList WHERE ID=@Id";
com.Parameters.AddWithValue("@Id", ID.Text);

Furthermore if that's your intention, then ExecuteNonQuery is wrong as that's for INSERT, UPDATE and other things that don't return a result.

