Problem solved. Thank you guys for help me.
Populating listbox with desired SQL colmn:
Correct code:
namespace MovieProject
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
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();
}
}
}
<pre><pre>