Hi
I have a windows form showing a customer enquiry.
There is a DGV showing each entry for this enquiry.
When the user deletes an entry, I need to loop through each record in the entry table and renumber the "itemNumber" field so they remain consecutive.
The item number field is not displayed in the DGV.
I have successfully done this using a data reader to iterate each record and update each item number value using an oleDbCommand Update.
I know there is a better way to do this as the form has the enquiry entry table adapter in it.
What’s the best way to edit a field in each line in the table…
Something like…
Thanks
Neil
I have a windows form showing a customer enquiry.
There is a DGV showing each entry for this enquiry.
When the user deletes an entry, I need to loop through each record in the entry table and renumber the "itemNumber" field so they remain consecutive.
The item number field is not displayed in the DGV.
I have successfully done this using a data reader to iterate each record and update each item number value using an oleDbCommand Update.
I know there is a better way to do this as the form has the enquiry entry table adapter in it.
What’s the best way to edit a field in each line in the table…
Something like…
Code:
For each row in the table
Edit the item number field
Next
Thanks
Neil