In sql server , my query brings out more than one row of data
SELECT * FROM TABLE 1 WHERE COLUMN LIKE 'PARAMETER'
Now i am trying to make it in a dtagrid that the datagrid shows allpossible rows that is supposed to show .This is the code
Dim objCommand As New SqlCommand("SELECT * FROM Pricelist WHERE [SECURITY] ='" & Me.cboCompany.SelectedItem & "'", objConnection)
Dim Reader As SqlDataReader = objCommand.ExecuteReader()
While Reader.Read
Me.dtgCompanyPriceList.Rows(0).Cells(0).Value = Reader("COMPANY ID").ToString
Me.dtgCompanyPriceList.Rows(0).Cells(1).Value = Reader("SYMBOL").ToString
Me.dtgCompanyPriceList.Rows(0).Cells(2).Value = Reader("SECURITY").ToString
Me.dtgCompanyPriceList.Rows(0).Cells(3).Value = Reader("OPENING PRICE").ToString
Me.dtgCompanyPriceList.Rows(0).Cells(4).Value = Reader("CLOSING PRICE").ToString
Me.dtgCompanyPriceList.Rows(0).Cells(5).Value = Reader("PUBDATE").ToString
Me.dtgCompanyPriceList.Rows(0).Cells(6).Value = Reader("DESCRIPTION").ToString
End While
Reader.Close()
objCommand.Dispose()
so anyway to make multiple rows to show will be appreciated thanks.