No announcements
Found 3491052 threads
-
6 Votes
How to select multiple columns from datatable in linq to sql?
HI, I am using LINQ to SQL and i want to select multiple columns with datatable ..Answered | 13 Replies | 50616 Views | Created by Jiten.negi - Tuesday, April 26, 2011 5:32 AM | Last reply by Sam_P31 - Wednesday, June 15, 2011 5:18 AM -
3 Votes
Sorting DataTable on multiple columns with Linq
I was looking into the for loop with an index since in the real project the sorted columns were actually extracted from another data structure with a way to ...Answered | 5 Replies | 4995 Views | Created by Gabriel.B - Friday, July 31, 2020 6:23 PM | Last reply by Gabriel.B - Wednesday, August 12, 2020 7:36 PM -
0 Votes
LINQ - output selected columns to DataTable>
Hi, When selecting field1 and field2 in the LINQ query, it becomes an anoymous type. see the sample code below when dealing with Anonymous Types.Answered | 4 Replies | 9152 Views | Created by Jay6447 - Tuesday, October 9, 2012 6:23 AM | Last reply by Norkk - Tuesday, October 9, 2012 7:31 PM -
1 Votes
Datatable Select with Multiple condition
(int)w["Id"] == 2 && (int)w["Status"] == 0) .Select(s => s).CopyToDataTable(); //1 result ...Answered | 5 Replies | 42984 Views | Created by Vinaya Kumar - Wednesday, June 13, 2012 3:13 PM | Last reply by Louis.fr - Thursday, June 14, 2012 9:58 AM -
0 Votes
Linq to DataTable.
Where are you getting the datatable from?Answered | 2 Replies | 2967 Views | Created by abivenkat - Thursday, June 30, 2011 8:16 AM | Last reply by GregHenry - Thursday, June 30, 2011 10:32 AM -
1 Votes
How to select a distinct record when multiple records are returned in Linq to SQL
Why can't you just use a Linq projection to just make the 3rd column be a constant value?Answered | 2 Replies | 1964 Views | Created by vsharma79 - Monday, November 10, 2014 7:56 AM | Last reply by darnold924 - Monday, November 10, 2014 6:09 PM -
0 Votes
From a VB multi-column DataTable select a single column of Sorted Distinct values copied to another DataTable
So, for multiple columns it could be: ToTable(True,Col1, Col2, Col3).Answered | 3 Replies | 2725 Views | Created by PJ at StertilUK - Wednesday, September 9, 2015 2:09 PM | Last reply by BonnieB - Thursday, September 10, 2015 2:01 PM -
1 Votes
LINQ Select specific columns
Hello, I am new to LINQ.Answered | 2 Replies | 8439 Views | Created by SNZ - Tuesday, June 9, 2009 4:42 PM | Last reply by SNZ - Wednesday, June 10, 2009 5:20 PM -
0 Votes
Get data from datatable with LINQ
So, on the end I figured out there is no way for me to pull quick data from datatable without looping through records.Answered | 7 Replies | 11987 Views | Created by Ilimax68 - Tuesday, December 11, 2012 2:27 PM | Last reply by Ilimax68 - Wednesday, December 12, 2012 1:36 PM -
1 Votes
sql “not in” in Linq using datatable
There seems to be nothing wrong with the code you have posted so your DataTable appearantly doesn't contain the expected data.Answered | 3 Replies | 774 Views | Created by MusakkhirSayyed - Wednesday, February 11, 2015 10:11 AM | Last reply by Magnus (MM8) - Wednesday, February 11, 2015 2:03 PM -
1 Votes
Select distinct rows from Datatable using Linq and iterate through them
Also see Select DISTINCT on DataTable John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.comAnswered | 6 Replies | 68450 Views | Created by SSreejith - Friday, May 15, 2009 2:20 PM | Last reply by Devendra Velegandla - Sunday, September 11, 2011 1:14 PM -
2 Votes
How to use LINQ to join multiple DataTables
318.entry (How To: Joining multiple DataTable using “LINQ to DataSet”).Answered | 14 Replies | 74531 Views | Created by Isolda - Saturday, May 23, 2009 2:34 AM | Last reply by Naomi N - Thursday, August 15, 2013 9:43 PM -
1 Votes
linq to datatable
You can just copy the code from their directly and then just call "CopyToDataTable" on your result.Answered | 6 Replies | 1432 Views | Created by Vagelis Dermos - Thursday, January 10, 2013 2:05 PM | Last reply by servy42 - Friday, January 11, 2013 7:15 PM -
1 Votes
Joining two datatables using LINQ
DataTable 'dtStruct' is populated from this typed data set.Answered | 6 Replies | 5723 Views | Created by Amit Shigwan - Friday, February 25, 2011 1:12 PM | Last reply by Amit Shigwan - Wednesday, March 2, 2011 9:51 AM -
0 Votes
Remove empty values from DataTable using Linq
field is System.DBNull || string.Compare((field as string).Trim(), string.Empty) == 0)).CopyToDataTable(); For more details check this ...Answered | 2 Replies | 13161 Views | Created by renatois - Tuesday, November 26, 2013 10:35 AM | Last reply by Raghavendra Shanbhag - Tuesday, December 3, 2013 1:49 PM -
0 Votes
Use Linq to Return a Row in a DataTable
:-) If Linq is used with a DataBase than use it with a DataContext (Linq to SQL) or with an entity.Answered | 8 Replies | 4747 Views | Created by Ryan0827 - Tuesday, January 24, 2012 9:22 PM | Last reply by Dig-Boy - Wednesday, January 25, 2012 1:21 PM -
3 Votes
How to convert this LINQ Result to DataTable
@VijayPrativadi, Just do a little complement LINQ to DataSet is to work with DataTable, and DataSet objects You ...Answered | 4 Replies | 5674 Views | Created by VijayPrativadi - Thursday, April 30, 2015 3:10 AM | Last reply by VijayPrativadi - Saturday, May 2, 2015 3:10 PM -
1 Votes
Writing a LINQ to DataTable that updates values
Hi Paul, You can use LINQ to Select the matching ID rows and from there you can assign the Selected Column, here's a ...Answered | 5 Replies | 22476 Views | Created by Paul DiBenedetto - Tuesday, April 6, 2010 8:30 PM | Last reply by asadnaeem - Friday, March 22, 2013 11:04 AM -
5 Votes
Find exact column sql error from linq
Linq to SQL knows the schema of the Table(s) and Column(s).Answered | 16 Replies | 19380 Views | Created by nick5454 - Friday, March 28, 2008 3:08 PM | Last reply by KristoferA - Thursday, February 24, 2011 3:28 AM -
0 Votes
Linq to select a specific row from a local dataTable (winform VS2012)
var item = (from dr in dt.Select() where (int)dr["Rank"] <= rankValue select dr) .Max(dr => ...Answered | 3 Replies | 9188 Views | Created by Rich P123 - Monday, June 16, 2014 3:27 PM | Last reply by Rich P123 - Monday, June 16, 2014 5:34 PM - Items 1 to 20 of 3491052 Next ›
No announcements