How can I get an specific row or cell value from a DataColumn object with no using a DataGrid?
.net, ado.net, vb.net
Solution
Rows and Columns are indexed starting from zero, so the second row would be indexed as 1:
SolTabla.Rows(1)(Columna)
Problem
This is the code I have: Sub Main() ``` Dim dts As New DataSet Dim da As New SqlDataAdapter Dim SolTabla As New DataTable Dim Columna As New DataColumn Cnx As New SqlConnection("Some Connection String") Dim vsql2 = "SELECT * FROM Table1 where code = '" & value & "'" da = New SqlDataAdapter(vsql2, Cnx) da.Fill(dts, "SomeTable") SolTabla = dts.Tables(0) Columna = SolTabla.Columns(0) ``` ...... End Sub For example, I want to access the second cell value in "Columna". How can I do this with no using a Datagrid?