Hello all. VB.NET newbie here.
I've learned (through this site) how to negotiate a dataset via:
For Each dRow In quanDS.Tables(0).Rows
'do something to each row
Next
I now need to figure out now to loop through a subset of the records returned in the dataset - here's a VB6 example I need to convert:
strSQL = "select * from tblDQ order by xid, xcode, xDOS"
rsMaster.Open strSQL, conDB, adOpenDynamic, adLockOptimistic
rsMaster.MoveFirst
Do While Not rsMaster.EOF
strxID = Trim(rsMaster!xID)
strxCode = Trim(rsMaster!xcode)
dblQuan = rsMaster!units
Do While Trim(rsMaster!xID) = strxID And Trim(rsMaster!xcode) = strxCode
rsMaster!unitdif = rsMaster!units - dblQuan
rsMaster.Update
dblQuan = rsMaster!units
rsMaster.MoveNext
If rsMaster.EOF Then
Exit Do
End If
Loop
Loop
rsMaster.Close
Any help at all would be appreciated!