score:1

try a sortedlist that sorts values according to keys. for instance:

dim orderlist as new sortedlist
    for count = 0 to orders.ordernum - 1
        orderlist.add(orders.orderdetail(count, "approxweight"), count)
    next

will sort values (count) according to the result of orders.orderdetail. that way you need not to call the sortlist method.

although, this

data.tables("ordertbl").rows(row).item("orderid") = orderid

does change the orderid column value of the row in the dataset's table, these changes do not get committed to database. have a look at this msdn walkthrough about saving data to database. basically, you need a dataadapter with an appropriate updatecommand setup to update database table with changes from dataset. if you're using a typed dataset in your program then committing changes to database becomes an easier task.


Related Query

More Query from same tag