I'm using the following code, which seems to work fine, but is there a way to address a datarow column/field by its name, instead of by its column index value?
Private Sub frmPermitEdit_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
StatusBarNavInfo = "Displaying 1 of " & RecordCount & " permits found"
StatusBar.Items(0).Text = StatusBarNavInfo
SQLConn = New SqlConnection(SQLConnString)
SQLAdapter = New SqlDataAdapter(strSQL, SQLConn)
dTable = New DataTable
DR = dTable.Rows(0)
Me.txtPermitNo.Text = DR.Item(0)
I guess I could map some contant integers against the fiield name like:
Public Const PermitNo As Integer = 0
but is there another easier/direct way?