How do I copy SQL-Server data into an array in c#? What I want to do is that to retrive the data from SQL-Server and store into an array in c# Right now i am having array but its a fixed one i want to copy data from SQL Server in this one.
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
hcVendas.YAxis.Add(new YAxisItem { title = new Title("Y") });
hcVendas.XAxis.Add(new XAxisItem { categories = new[] { "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002" } });
//New data collection
var series = new List<Serie>();
series.Add(new Serie { data = new object[] { 400, 435, 446, 479, 554, 634, 687, 750, 831 } });
//bind
hcVendas.DataSource = series;
hcVendas.DataBind();
}
Now how to bind data into new [] and new object [] from particular column of SQL Server

