All I am getting is the empty listBox while retrieving data from DataSet. Heres the code:
DataSet dt_product = dBCommand.ExecuteNonQuery("SELECT * FROM PRODUCT"); listBx_prod.DataSource=dt_product.Tables.Columns.ExtendedProperties.Cast<DataRow>().ToList();
I debugged and my DataSet successfully retrieves data from Database. Where am I wrong?
I must admit that i don't know why you are trying to read the
PropertyCollection from the second
DataColumn in your first table of the
ExtendedProperties at all.
But since you've mentioned that you just want to show the data in the
listBx_prod.DataSource = dt_product.Tables; listBx_prod.DisplayMember = "ProductName"; listBx_prod.ValueMember = "ProductId";