I am working on a desktop App in VB.net with SQL Server as back end.
I have a smaller dataset from a Conditions Table that has condition name and condition values.
I have a datagridview that has my main table data. Before loading, I want to verify each row against this bunch of conditions and set the flag value in my main table. And then I will load the grid.
In vb6 I would do the following,
Create a recordset from the Conditions field called rsConditions
Populate Datagrid with main table data
For I = 0 to Datagrid.rows.count - 1
while not rsconditons.eof
'Do some verification
How do i do this in VB.net. I tried using Dataset so that I can iterate thru, but how do i retrieve field name and field value of my dataset in an easier and simpler way? Can you user dataset just like a recordset and move pointers back and forth? I will appreciate if some one provides me with a sample code .I have a project due this week and I am stuck here. Appreciate your help. Thank you.
Dim nCount As Integer = dt.Columns.Count
Dim dataViewOrg As New DataView(dt)
For i = 0 To dataViewOrg.Count - 1
'This is where I want to insert my smnaller while loop to check each column of this row agains the conditions