tags:

views:

78

answers:

1

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?

+2  A: 

Rows and Columns are indexed starting from zero, so the second row would be indexed as 1:


SolTabla.Rows(1)(Columna)
Alfred Myers
oh yes! It was with the rows! I'm a newbie with Databases, he he. Thanks a lot!
yelinna