This code is updating rows in a table with data from an MSFlexGrid control. If you want to change this to a stored procedure, you can update only one row at a time by calling the stored procedure.
CREATE PROCEDURE UpdateInvoice (
InvNo varchar,
InvValue float,
............
)
AS
BEGIN
UPDATE Invoice SET InvValue = @InvValue, .......
WHERE InvNo = @InvNo
END
and then call this stored procedure from your code and pass on the parameters.