string baglanti = "Server=ServerAdresi,;Database=DataBase_Adi;Trusted_Connection=True;";
SqlCommand cmd = new SqlCommand("select Kolon_Adi from Tablo_Adi", baglanti);
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
comboBox1.Items.Add(dr["Kolon_Adi"]);
}
alıntı