بدین شکل هم نوشتم جواب نداد :
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
using (SqlConnection c = new SqlConnection("(local)","store"))
{
c.Open();
using (SqlDataAdapter a=new SqlDataAdapter("SELECT * FORM products where p_name='" + comboBox1.Text + "'",c))
{
DataTable t = new DataTable();
a.Fill(t);
textBox1.Text = t.Rows[0]["p_price"].ToString();
textBox2.Text = t.Rows[0]["p_number"].ToString();
}
}