Skip to main content

All Questions

Tagged with
0 votes
0 answers
36 views

For Loop through filtered datatable using LINQ Select Clause?

Is it possible to loop through a filtered data table and update the items as needed? In my 'For i As..Next' loop, I want to check the value of a specific column in the next row and if they're not ...
Candace Aisenbrey's user avatar
-1 votes
2 answers
32 views

Left Join on Data table with Where Clause using LinQ

I am trying to perform a left join on two data tables using LinQ and there are two WHERE Clause in it. Here is a snippet of the code: I have tried the below code snippet: var resultList = (from p in ...
vaibhav chitransh's user avatar
0 votes
0 answers
46 views

VB.net Nested 'For Each' Loop Slow

Can someone suggest how I can improve the performance of my nested For Each loops? This logic accepts a string variable CSV style parameter and converts it into a data table. We are adding some ...
Candace Aisenbrey's user avatar
0 votes
0 answers
38 views

How check linq/xml against file when multiple conditions?

I have a project that reads xml of expected build results for each build area, and compares against build logs to see if the build passed. Right now, the linq is showing each condition in a separate ...
Michele's user avatar
  • 3,797
0 votes
0 answers
74 views

Adding rows to a datatable takes too long

If reader.AsDataSet.Tables(0).Rows.Count > 0 Then Dim DistItemslist As New List(Of Eidos) Dim dgv As New DataGridView() Dim dic As New Dictionary(Of String, Integer)() Dim ...
kokotas's user avatar
  • 111
0 votes
1 answer
80 views

Joining tables using primary keys LINQ

I'm trying to join tables by primary keys using the PrimaryKey method (the ID column is the primary key in both tables). But at the end I get an empty table. Tell me how to make the request correct? ...
sereganator's user avatar
0 votes
1 answer
128 views

IEnumerable to datatable [duplicate]

Please tell me how to write the result of a query in a DataTable? var result = from clients in Clients_dt.AsEnumerable() join cities in Cities_dt.AsEnumerable() on ...
sereganator's user avatar
1 vote
0 answers
38 views

Merge or Join two tables to a new table, but PKs differ

Say I have two tables in C#: dt1 defines Codes; Code is the PK. Code A B C A-110 foo bar buz A-111 (NULL) qem sob A-112 (NULL) (NULL) idk dt2 refers to dt1's codes in a n:1 manner, but has ID as ...
Atrus2711's user avatar
0 votes
1 answer
97 views

C# LINQ Select rows from DataTable or DataView Where 2 Value Matches

I converted CRMDataSetSent into a DataTable/DataView containing the full list of records. DataTable CRMDataSetSent_Dt = new DataTable(); da.Fill(CRMDataSetSent_Dt, Variables.CRMDataSetSent); DataView ...
gymcode's user avatar
  • 4,583
0 votes
0 answers
53 views

How to select particular columns from Datatable and insert into other Datatable in web API using linq Query

How to select particular columns in datatable and insert into other datatable . If there are 5 columns like ID, Name, PhNumber, Address,Salary in a Datatable I want to select only ID, Name, PhNumber ...
Fortunate Lucy's user avatar
-1 votes
1 answer
79 views

How to lookup from the second source datatable to the first datatable with vb.net

How to lookup from the second source datatable to the first datatable with vb.net. Is it possible to apply lookup datatable if possible? please guide me Thanks Private table1 As New DataTable ...
roy's user avatar
  • 729
0 votes
1 answer
103 views

Convert a List<object[]> to List<object> where the count of object[] is dynamic

How could we convert a List<object[]> to List<object> where the count of objects in object[] is dynamic(in a single collection it is the same i.e. items[0].count is equal to items[1].count ...
Amit Bisht's user avatar
  • 5,058
0 votes
0 answers
112 views

DataTable Aggregate Function with Dynamic LINQ

I've an old project with following function that return a DataTable with aggregate function in Linq. Now my goal is to use aggregate function with dynamic linq getting values from json file. I've seen ...
Franco's user avatar
  • 101
0 votes
1 answer
47 views

c# linq Query on datatable groupby having count

I have a datatable and I need to perform the following query on it (sql): SELECT C1, C2, C3, count(*) FROM MyTable group by C1, C2, C3 having COUNT (*) > 1 Can you point me to some code, in order ...
user1238784's user avatar
  • 2,410
0 votes
1 answer
67 views

Convert multiple list of data into data table based on common property in c#

I have multiple list of signal datas with timestamp. for ex SignalA contain list of {time, value} object. Similarly, SignalB contain list of {time, value} object. I can have any number of such list, ...
dnyaneshwar's user avatar
  • 1,294

15 30 50 per page
1
2 3 4 5
89