I am using a For Loop to set one column in every row of my DataTable to a certain value. It is working for all rows except the first one. Here is my code.
I have stepped through the code, and the value of "kit_no" is an empty string before and after it attempts to change the value for the first record (i=0). The code doesn't get an error, and "kit_no" in every row after the first one is set to strKitNo as expected. Any ideas on what is causing this?
Thanks,
Andrea
Code:
For i = 0 To dsWorkOrderFlex.Tables("WorkOrder").Rows.Count - 1
dsWorkOrderFlex.Tables("WorkOrder").Rows(i)("kit_no") = strKitNo
Next
I have stepped through the code, and the value of "kit_no" is an empty string before and after it attempts to change the value for the first record (i=0). The code doesn't get an error, and "kit_no" in every row after the first one is set to strKitNo as expected. Any ideas on what is causing this?
Thanks,
Andrea