I'm trying to find out best practises on updating particular row columns based on my vb.net form.
With my form, what happens is you click on a combobox which is bound to an RA column.
It then reads the row information and places that into the textboxes on the form.
This is for a repairs database, so basically I can't update all of the information straight away, as I won't be sure if I will have all the information straight away. E.G
I have a our cost field and a customer cost field, quote checkbox and accept checkbox.
I will be able to fill out the our cost, customer cost and quote fields, but I can't do the accept checkbox, as I haven't sent it to the customer as yet.
The only way I can think of doing this at the moment is to have a separate function for each field depending on whether that field is populated, or nothing.
E.G If our_cost .text isnot nothing then
- Do query (update row where ra = "x" -
If accept.checked = true then
- do query -
But, this does require a lot of separate functions and sql statements within the program and I would only be updating one column at a time. I'm thinking there must be a better way.
And also, When I do go into flag that accept checkbox - I don't particularly need it to update the columns of information since they've already been updated. Should I just update the entire row, or is there a way to say if textbox = same as column, do nothing?