private void AutoradioButton1_Click(object sender, EventArgs e) { SqlConnection conn = new SqlConnection("Server=CHRIS-PC\\SQLEXPRESS;Database=Tblcat;" + "Integrated Security=True"); SqlCommand scmd = new SqlCommand("SELECT Description FROM Moviecat", conn); DataSet sds = new DataSet(); conn.Open(); SqlDataAdapter sadptr = new SqlDataAdapter(scmd); sadptr.Fill(sds, "Moviecat"); if (sds.Tables["Moviecat"].Rows.Count == 0) { MessageBox.Show("There are no DB."); } else { this.listBox1.DataSource = sds.Tables["Moviecat"]; this.listBox1.DisplayMember = "Description"; } conn.Close(); }
checkedlistbox1
AutoradioButton1_Click
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)