Hi! The for loop works and it reads the value of recno()
. However, the sql code itself is being executed once only.
Is there any tweak I need to do for DB2 iSeries codes?
For k = 0 To recno.Length - 1
sqlUpdate = "UPDATE shipment SET status=@status WHERE recno=@recno"
With cmdUpdate
.Parameters.AddWithValue("@status", "A")
.Parameters.AddWithValue("@recno", recno(k))
.CommandText = sqlUpdate
.Connection = conn
.ExecuteNonQuery()
End With
Next
Thanks!