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.
Source: stackoverflow.com
Related Query
- How Can I Match Orders to Products?
- Using LINQ. With two different lists. How can I identify objects that do not match
- How can I use linq to return integers in one array that do not match up with an integer property of another array?
- How can I switch that code to use LINQ
- How can I combine this code into one or two LINQ queries?
- How can I write the following code more elegantly using LINQ query syntax?
- How can I further simplify this piece of LINQ code
- How can I code an outer join using LINQ and EF6?
- How can I modify this C# code so that Visual Studio recognizes that I'm not an idiot?
- How can I code a Linq query to do an upward Include?
- How can I combine IObservable<T>.Throttle() with some other event source using Reactive Extensions?
- How can i copy data table records of different field name based on mapping list evaluating condition on source data table?
- How can I change this StringBuilder-to-XML code to LINQ-to-XML?
- How can we express the following code using query expression?
- How can I fetch child entities as DTO in parent using reusable queries/Expression's with EF code first?
- How can I refactor this code for LINQ filtering?
- How can I perform a left join and exclude results that match a subquery in LINQ?
- How can I check the number of calls to the database in LINQ query when using .NET Core and Code First?
- How can I code numerous MIN functions into one LINQ to DataSet query
- How can this Data Access Code Lose Data?
- How can I rewrite this code to LINQ?
- How can I match substrings of a list's elements in another list?
- How can I dynamically build a linq OR query where one of several columns can match the search string?
- How can I use LINQ to match words
- How can I simplify this LINQ query that searches for keywords in strings and orders them by relevance?
- How can I simplify this LINQ code
- How can I use set operations to delete objects in an entitycollection that match a collection of view models?
- How to find a match in a list of LxWxT where Positions of L and W can vary
- how can i add source node as child node in project?
- How can i make this code more optimized - How can i replace the forloop.?
More Query from same tag
- Json does not go to next or previous text when clicking on button with using Linq in C#
- Removing XML elements using LINQ
- Lambda Sort on Long Types
- Does LinqDataSource perform Server-Side paging by default?
- Cast a Linq result set to an interface
- Using linq to select possible values for multiple database columns in one SQL query (EF6)
- How to execute an operator on the result of a linq subquery only when the result is not null?
- To determine if one of the Strings from a list contains the initial part of a specified string using LINQ
- Query a SQL Server table with multiple variables using LINQ and C# and return the results
- Get every nth item starting at nth position
- Using Linq to Sort Students within Groups and then Rearrange Group Order
- Linq: Create empty IGrouping
- Is Microsoft going to support SQL Server 2008 with LINQ in Visual Studio 2010?
- Add data to a list insde a list where item in the prerent list
- How to add dynamic sort by direction to NHibernate queryover
- How to convert foreach loop to a Linq query?
- Extra Columns While Converting Linq Result into Data Table
- Linq OrderBy with an expression variable
- Conditionals inside Functional construction with LINQ to XML
- Converting a List of String Type To Decimal Type List
- Linq with join, group and sum not working
- WPF Datagrid showing columns twice
- Distinct list of objects based on an arbitrary key in LINQ
- Linq Orderby random ThreadSafe for use in ASP.NET
- Find value in Dictionary<int,List<int>>
- List in asp.net linq query not working
- How to add add items near to next list
- C# LINQ IdentityContext Multi Group Join
- How to find frequency of each element in DatagridView
- Overriding LINQ extension methods