title: Datagrid showing 1 result only
body: <p>I have created a code to display data from datagrid and I have 3 data on the database but the query only display 1 result. here is my code below:</p>
  
  
  
  <pre class="lang-vb prettyprint-override"><code> Public Sub displayGrid()
      Using connection As New MySqlConnection(connectionstring)
          SQL = "Select * from IPQC_modelParameter"
          Using da As New MySqlDataAdapter(SQL, connection)
              Dim ds = New DataSet
              da.Fill(ds)
              For x As Integer = 0 To ds.Tables(0).Rows.Count
                  DataGridView1.Rows.Insert(0) 'this will add a new record on top, always
                  DataGridView1.Rows(0).Cells(0).Value = ds.Tables(0).Rows(x)("id")
                  DataGridView1.Rows(0).Cells(1).Value = ds.Tables(0).Rows(x)("full_model")
                  DataGridView1.Rows(0).Cells(2).Value = ds.Tables(0).Rows(x)("model_name")
                  DataGridView1.Rows(0).Cells(3).Value = ds.Tables(0).Rows(x)("parameter")
                  DataGridView1.Rows(0).Cells(4).Value = ds.Tables(0).Rows(x)("instrument")
                  DataGridView1.Rows(0).Cells(5).Value = ds.Tables(0).Rows(x)("nominal")
                  DataGridView1.Rows(0).Cells(6).Value = ds.Tables(0).Rows(x)("tolerance")
                  DataGridView1.Rows(0).Cells(7).Value = ds.Tables(0).Rows(x)("ucl")
                  DataGridView1.Rows(0).Cells(8).Value = ds.Tables(0).Rows(x)("lcl")
                  'DataGridView1.Rows(0).Cells(9).Value = ds.Tables(0).Rows(x)("uot")
                  'DataGridView1.Rows(0).Cells(10).Value = ds.Tables(0).Rows(x)("lot")
                  DataGridView1.Rows(0).Cells(11).Value = ds.Tables(0).Rows(x)("mrnominal")
                  DataGridView1.Rows(0).Cells(12).Value = ds.Tables(0).Rows(x)("mrucl")
                  'DataGridView1.Rows(0).Cells(13).Value = ds.Tables(0).Rows(x)("status")
                  'DataGridView1.Rows(0).Cells(14).Value = ds.Tables(0).Rows(x)("mp_id")
                  DataGridView1.Rows(0).Cells(15).Value = ds.Tables(0).Rows(x)("usl")
                  DataGridView1.Rows(0).Cells(16).Value = ds.Tables(0).Rows(x)("lsl")
                  DataGridView1.Rows(0).Cells(17).Value = ds.Tables(0).Rows(x)("conversion")
  
              Next
  
          End Using
      End Using
  End Sub
  </code></pre>