title: how to plot a line graph by reading the values from database (sql) in vb.net?
body: <p>i'm using vb.net and sql as my database. 
  how i'm going to plot a line graph ? by using this sql statement </p>
  
  <p>my X axis will be the range value from Time_stamp that will be key-in by user which i assign that as =  from 6/24/2013 8:38:00 AM to 6/24/2013 8:38:23 AM
  and my Y axis will be BB_ID that will key-in by user and i assign that as = 3100</p>
  
  <p>this is my general code :</p>
  
  <pre><code>    Dim connectionString As String = "server='abc'; user id='***'; password='***'; Database='***'"
      Dim sqlConnection As SqlClient.SqlConnection = New SqlClient.SqlConnection(connectionString)
  
      sqlConnection.Open()
  
      Dim queryString As String = "SELECT Time_stamp, BB_ID, Status, " &amp; _
      "(CASE WHEN Status = 'R' THEN 0 WHEN status = 'O' THEN 1 ELSE 2 END) AS newstatus"&amp; _
      "FROM(dbo.rawdata)" &amp; _
      "WHERE (BB_ID = '3100') AND (Time_stamp &gt;= '6/24/2013 8:38:00 AM') AND (Time_stamp &lt;= '6/24/2013 8:38:23 AM')"
  
      Chart1.Series("line_area").Points.AddXY("3100", "10")
      Chart1.Series("line_area").Points.AddXY("3100", "8")
      Chart1.Series("line_area").ChartType = System.Web.UI.DataVisualization.Charting.SeriesChartType.Line
  
      sqlConnection.Close()
  </code></pre>